Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOP-3298: Install snooty parser from prebuilt images #713

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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