diff --git a/Dockerfile b/Dockerfile index a71e96bf6..8e41fb2a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,22 +30,12 @@ ARG NPM_BASE_64_AUTH ARG NPM_EMAIL ENV DEBIAN_FRONTEND=noninteractive -# 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 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 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 # helper libraries for docs builds -RUN apt-get update && apt-get install -y vim git +RUN apt-get update && apt-get install -y vim git unzip rsync curl -ENV PATH="${PATH}:/opt/snooty:/opt/mut:/home/docsworker-xlarge/.local/bin:/usr/local/lib/python2.7/dist-packages/virtualenv/bin" +ENV PATH="${PATH}:/opt/snooty:/opt/mut:/home/docsworker-xlarge/.local/bin" # get node 18 # https://gist.github.com/RinatMullayanov/89687a102e696b1d4cab diff --git a/Dockerfile.legacy b/Dockerfile.legacy deleted file mode 100644 index e8c990d27..000000000 --- a/Dockerfile.legacy +++ /dev/null @@ -1,43 +0,0 @@ -# Debian Bookworm removes Python 2, and Bullseye exits its support period in 2024. -# The solution is probably to switch to Ubuntu 22.04 at that point, which is supported until 2027. -FROM node:14-bullseye-slim - -ARG MUT_VERSION=0.10.6 - -ENV PATH="${PATH}:/opt/mut" - -RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - git \ - python2.7 \ - rsync \ - unzip \ - && rm -rf /var/lib/apt/lists/* \ - && curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py && python2.7 get-pip.py && rm get-pip.py \ - && python2.7 -m pip install --no-cache-dir virtualenv==20.15.1 \ - && virtualenv /venv \ - && /venv/bin/pip install --no-cache-dir -r https://raw.githubusercontent.com/mongodb/docs-tools/master/giza/requirements.txt \ - \ - && curl -L -o mut.zip https://github.com/mongodb/mut/releases/download/v${MUT_VERSION}/mut-v${MUT_VERSION}-linux_x86_64.zip \ - && unzip -d /opt/ mut.zip \ - && rm mut.zip \ - && apt-get purge -y --auto-remove unzip - -RUN groupadd -r builduser && useradd --no-log-init -ms /bin/bash -r -g builduser builduser -ARG WORK_DIRECTORY=/home/builduser -WORKDIR ${WORK_DIRECTORY} - -COPY --chown=builduser:builduser config config/ -COPY --chown=builduser:builduser package*.json ./ -COPY --chown=builduser:builduser tsconfig*.json ./ -COPY --chown=builduser:builduser . ./ - -USER builduser -RUN curl https://raw.githubusercontent.com/mongodb/docs-worker-pool/meta/makefiles/shared.mk -o shared.mk -RUN npm install -RUN npm run build - -RUN mkdir repos && chmod 755 repos -EXPOSE 3000 -CMD ["node", "build/app.js"]