diff --git a/Dockerfile b/Dockerfile index a8c0301e3f..ca46ea7798 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,23 +23,21 @@ RUN cd ./modules/oas-page-builder \ FROM ubuntu:20.04 ARG SNOOTY_PARSER_VERSION=0.13.16 ARG SNOOTY_FRONTEND_VERSION=0.13.36 -# The Redoc CLI branch will most likely stay static. Updates to the branch should +# The Redoc CLI branch will most likely stay static. Updates to the branch should # be limited to CLI bug fixes and Redoc dependency version bumps ARG REDOC_CLI_VERSION=0.1.1 ARG FLIT_VERSION=3.0.0 ARG NPM_BASE_64_AUTH ARG NPM_EMAIL ENV DEBIAN_FRONTEND=noninteractive -ENV FLIT_ROOT_INSTALL=1 # install legacy build environment for docs RUN apt-get -o Acquire::Check-Valid-Until=false update -RUN apt-get -y install libpython2.7-dev python2.7 git rsync -RUN apt-get -y install curl +RUN apt-get -y install libpython2.7-dev python2.7 git rsync unzip curl RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py RUN python2.7 get-pip.py RUN pip install requests virtualenv virtualenvwrapper py-dateutil -RUN python2.7 -m pip install python-dateutil +RUN python2.7 -m pip install python-dateutil RUN virtualenv /venv RUN /venv/bin/pip install --upgrade --force setuptools RUN /venv/bin/pip install -r https://raw.githubusercontent.com/mongodb/docs-tools/master/giza/requirements.txt @@ -51,7 +49,7 @@ RUN apt-get -y install git pkg-config libxml2-dev RUN python3 -m pip install https://github.com/mongodb/mut/releases/download/v0.10.2/mut-0.10.2-py3-none-any.whl -ENV PATH="${PATH}:/home/docsworker-xlarge/.local/bin:/usr/local/lib/python2.7/dist-packages/virtualenv/bin" +ENV PATH="${PATH}:/opt/snooty:/home/docsworker-xlarge/.local/bin:/usr/local/lib/python2.7/dist-packages/virtualenv/bin" # get node 14 # https://gist.github.com/RinatMullayanov/89687a102e696b1d4cab @@ -63,6 +61,10 @@ RUN apt-get install --yes build-essential # use npm 7.* RUN npm install npm@7 +# install snooty parser +RUN curl -L -o snooty-parser.zip https://github.com/mongodb/snooty-parser/releases/download/v${SNOOTY_PARSER_VERSION}/snooty-v${SNOOTY_PARSER_VERSION}-linux_x86_64.zip \ + && unzip -d /opt/ snooty-parser.zip + # setup user and root directory RUN useradd -ms /bin/bash docsworker-xlarge RUN npm -g config set user root @@ -74,12 +76,6 @@ WORKDIR ${WORK_DIRECTORY} # get shared.mk RUN curl https://raw.githubusercontent.com/mongodb/docs-worker-pool/meta/makefiles/shared.mk -o shared.mk -# install snooty parser -RUN git clone -b v${SNOOTY_PARSER_VERSION} --depth 1 https://github.com/mongodb/snooty-parser.git \ - && python3 -m pip install pip==20.2 flit==${FLIT_VERSION} \ - && cd snooty-parser \ - && python3 -m flit install - # install snooty frontend and docs-tools RUN git clone -b v${SNOOTY_FRONTEND_VERSION} --depth 1 https://github.com/mongodb/snooty.git \ && cd snooty \