Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit 7fbbce9

Browse files
committed
DOP-3592: Add legacy dockerfile
1 parent 08bb923 commit 7fbbce9

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

Dockerfile.legacy

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Debian Bookworm removes Python 2, and Bullseye exits its support period in 2024.
2+
# The solution is probably to switch to Ubuntu 22.04 at that point, which is supported until 2027.
3+
FROM node:14-bullseye-slim
4+
5+
ARG MUT_VERSION=0.10.3
6+
7+
ENV PATH="${PATH}:/opt/mut"
8+
9+
RUN apt-get update && apt-get install -y --no-install-recommends \
10+
ca-certificates \
11+
curl \
12+
git \
13+
python2.7 \
14+
rsync \
15+
unzip \
16+
&& rm -rf /var/lib/apt/lists/* \
17+
&& curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py && python2.7 get-pip.py && rm get-pip.py \
18+
&& python2.7 -m pip install --no-cache-dir virtualenv==20.15.1 \
19+
&& virtualenv /venv \
20+
&& /venv/bin/pip install --no-cache-dir -r https://raw.githubusercontent.com/mongodb/docs-tools/master/giza/requirements.txt \
21+
\
22+
&& curl -L -o mut.zip https://github.com/mongodb/mut/releases/download/v${MUT_VERSION}/mut-v${MUT_VERSION}-linux_x86_64.zip \
23+
&& unzip -d /opt/ mut.zip \
24+
&& rm mut.zip \
25+
&& apt-get purge -y --auto-remove unzip
26+
27+
RUN groupadd -r builduser && useradd --no-log-init -ms /bin/bash -r -g builduser builduser
28+
ARG WORK_DIRECTORY=/home/builduser
29+
WORKDIR ${WORK_DIRECTORY}
30+
31+
COPY --chown=builduser:builduser config config/
32+
COPY --chown=builduser:builduser package*.json ./
33+
COPY --chown=builduser:builduser tsconfig*.json ./
34+
COPY --chown=builduser:builduser . ./
35+
36+
USER builduser
37+
RUN curl https://raw.githubusercontent.com/mongodb/docs-worker-pool/meta/makefiles/shared.mk -o shared.mk
38+
RUN npm install
39+
RUN npm run build
40+
41+
RUN mkdir repos && chmod 755 repos
42+
EXPOSE 3000
43+
CMD ["node", "build/app.js"]

0 commit comments

Comments
 (0)