Skip to content

Commit

Permalink
DOP-3298: Install snooty parser from prebuilt images
Browse files Browse the repository at this point in the history
  • Loading branch information
i80and committed Nov 17, 2022
1 parent 6b9a609 commit 05b9956
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,18 @@ 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
RUN apt-get -y install libpython2.7-dev python2.7 git rsync
RUN apt-get -y install curl
RUN apt-get -y install curl unzip
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
Expand All @@ -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
Expand All @@ -60,10 +58,9 @@ 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" \
&& mkdir -p ~/.local/snooty \
&& 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 \
Expand Down

0 comments on commit 05b9956

Please sign in to comment.