From c2de1c2e1c0d3b4711bc33bdcda7d6f6595fd24e Mon Sep 17 00:00:00 2001 From: Heli Aldridge Date: Wed, 16 Nov 2022 23:23:33 -0500 Subject: [PATCH] DOP-3298: Install snooty parser from prebuilt images --- Dockerfile | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index c5b66b2219..b08dc1e836 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,11 +12,9 @@ RUN npm run build FROM ubuntu:20.04 ARG SNOOTY_PARSER_VERSION=0.13.13 ARG SNOOTY_FRONTEND_VERSION=0.13.32 -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 @@ -25,7 +23,7 @@ RUN apt-get -y install 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 @@ -37,7 +35,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}:/home/docsworker-xlarge/.local/bin:/home/docsworker-xlarge/.local/snooty/:/usr/local/lib/python2.7/dist-packages/virtualenv/bin" # get node 14 # https://gist.github.com/RinatMullayanov/89687a102e696b1d4cab @@ -60,10 +58,8 @@ WORKDIR /home/docsworker-xlarge 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 +RUN curl -OL https://github.com/mongodb/snooty-parser/releases/download/v${SNOOTY_PARSER_VERSION}/snooty-v${SNOOTY_PARSER_VERSION}-linux_x86_64.zip \ + && unzip snooty-v${SNOOTY_PARSER_VERSION}-linux_x86_64.zip -d ~/.local/snooty # install snooty frontend and docs-tools RUN git clone -b v${SNOOTY_FRONTEND_VERSION} --depth 1 https://github.com/mongodb/snooty.git \