-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
48 lines (36 loc) · 1.52 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM ubuntu:22.04
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
ARG PROTO_HOME=/runtime/proto
ARG PY_PACKAGE_DIR=/runtime/python/packages
ENV PROTO_HOME=$PROTO_HOME
# Make required directories
RUN mkdir -p /data/db
# Basic setup and core packages
RUN apt update -y && apt upgrade -y
RUN apt install -y bash curl unzip supervisor qemu-user-static
RUN apt install -y git gzip xz-utils make g++ build-essential
# Install MongoDB dependencies
RUN apt install -y libcurl4 libgssapi-krb5-2 libldap-2.5-0 libwrap0 libsasl2-2 libsasl2-modules libsasl2-modules-gssapi-mit openssl liblzma5
# Install proto
RUN curl -fsSL https://moonrepo.dev/install/proto.sh | bash -s -- --no-profile --yes
# Hack to make Proto work with Docker for subsequent RUN commands
ENV PATH="${PROTO_HOME}/bin:${PROTO_HOME}/shims:${PY_PACKAGE_DIR}/bin:$PATH"
ENV PYTHONPATH="${PY_PACKAGE_DIR}:$PYTHONPATH:."
ENV PIP_TARGET="${PY_PACKAGE_DIR}"
WORKDIR /runtime
COPY .prototools .
RUN proto install
# Install MongoDB
RUN curl -o mongo.tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-6.0.18.tgz \
&& tar -xvzf mongo.tgz \
&& mv mongodb-linux-x86_64-ubuntu2204-6.0.18/bin/mongo* /usr/local/bin \
&& rm -rf mongo*
# Install MongoDB Shell
RUN curl -o mongo-shell.tgz https://downloads.mongodb.com/compass/mongosh-2.3.4-linux-x64.tgz \
&& tar -xvzf mongo-shell.tgz \
&& mv mongosh-2.3.4-linux-x64/bin/mongosh /usr/local/bin/ \
&& mv mongosh-2.3.4-linux-x64/bin/mongosh_crypt_v1.so /usr/local/lib/ \
&& rm -rf mongo*
CMD ["/bin/sh", "-c", "bash"]