Skip to content

Commit 05b9956

Browse files
committed
DOP-3298: Install snooty parser from prebuilt images
1 parent 6b9a609 commit 05b9956

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Dockerfile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,18 @@ RUN npm run build
1212
FROM ubuntu:20.04
1313
ARG SNOOTY_PARSER_VERSION=0.13.13
1414
ARG SNOOTY_FRONTEND_VERSION=0.13.32
15-
ARG FLIT_VERSION=3.0.0
1615
ARG NPM_BASE_64_AUTH
1716
ARG NPM_EMAIL
1817
ENV DEBIAN_FRONTEND=noninteractive
19-
ENV FLIT_ROOT_INSTALL=1
2018

2119
# install legacy build environment for docs
2220
RUN apt-get -o Acquire::Check-Valid-Until=false update
2321
RUN apt-get -y install libpython2.7-dev python2.7 git rsync
24-
RUN apt-get -y install curl
22+
RUN apt-get -y install curl unzip
2523
RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
2624
RUN python2.7 get-pip.py
2725
RUN pip install requests virtualenv virtualenvwrapper py-dateutil
28-
RUN python2.7 -m pip install python-dateutil
26+
RUN python2.7 -m pip install python-dateutil
2927
RUN virtualenv /venv
3028
RUN /venv/bin/pip install --upgrade --force setuptools
3129
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
3735
RUN python3 -m pip install https://github.com/mongodb/mut/releases/download/v0.10.2/mut-0.10.2-py3-none-any.whl
3836

3937

40-
ENV PATH="${PATH}:/home/docsworker-xlarge/.local/bin:/usr/local/lib/python2.7/dist-packages/virtualenv/bin"
38+
ENV PATH="${PATH}:/home/docsworker-xlarge/.local/bin:/home/docsworker-xlarge/.local/snooty/:/usr/local/lib/python2.7/dist-packages/virtualenv/bin"
4139

4240
# get node 14
4341
# https://gist.github.com/RinatMullayanov/89687a102e696b1d4cab
@@ -60,10 +58,9 @@ WORKDIR /home/docsworker-xlarge
6058
RUN curl https://raw.githubusercontent.com/mongodb/docs-worker-pool/meta/makefiles/shared.mk -o shared.mk
6159

6260
# install snooty parser
63-
RUN git clone -b v${SNOOTY_PARSER_VERSION} --depth 1 https://github.com/mongodb/snooty-parser.git \
64-
&& python3 -m pip install pip==20.2 flit==${FLIT_VERSION} \
65-
&& cd snooty-parser \
66-
&& python3 -m flit install
61+
RUN curl -OL "https://github.com/mongodb/snooty-parser/releases/download/v${SNOOTY_PARSER_VERSION}/snooty-v${SNOOTY_PARSER_VERSION}-linux_x86_64.zip" \
62+
&& mkdir -p ~/.local/snooty \
63+
&& unzip "snooty-v${SNOOTY_PARSER_VERSION}-linux_x86_64.zip" -d ~/.local/snooty
6764

6865
# install snooty frontend and docs-tools
6966
RUN git clone -b v${SNOOTY_FRONTEND_VERSION} --depth 1 https://github.com/mongodb/snooty.git \

0 commit comments

Comments
 (0)