Skip to content
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
18 changes: 11 additions & 7 deletions legacy-mongo-shell/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
# sync tag with git clone's argument below
FROM mongo:7.0.21 AS build
FROM mongo:8.0.10 AS build

RUN apt update
RUN apt install -y \
git \
python3-pip \
libssl-dev \
libcurl4-openssl-dev \
liblzma-dev \
libcurl4-openssl-dev
libssl-dev \
python3-pip \
python3-poetry \
python3-venv

WORKDIR /mongo

# sync tag with image tag above
RUN git clone -b r7.0.21 --depth 1 --progress https://github.com/mongodb/mongo.git .
RUN git clone -b r8.0.10 --depth 1 --progress https://github.com/mongodb/mongo.git .

RUN python3 -m pip install -r etc/pip/compile-requirements.txt
# RUN python3 -m venv python3-venv
# RUN ./python3-venv/bin/pip install poetry
RUN poetry install --no-root --sync

# If you get "g++: fatal error: Killed signal terminated program cc1plus" or a similar error,
# increase the amount of memory available to Docker,
# or add `-j1` parameter to build sequentially.
RUN python3 buildscripts/scons.py install-mongo --linker=gold --disable-warnings-as-errors

FROM mongo:7.0.21
FROM mongo:8.0.10

COPY --from=build /mongo/build/install/bin/mongo /usr/bin
RUN ln -sv /usr/bin/mongo /mongo
Expand Down