bethanie05 commited on
Commit
22d7251
·
verified ·
1 Parent(s): ff2e80d

Switch to MongoDB 7

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -15
Dockerfile CHANGED
@@ -11,27 +11,33 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
11
 
12
  RUN apt-get update && apt-get install -y \
13
  curl \
14
- gnupg \
15
  ca-certificates \
16
- cron \
 
17
  procps \
 
 
 
 
 
 
 
 
 
 
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
- RUN curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc \
21
- | gpg --dearmor -o /usr/share/keyrings/mongodb-server-8.0.gpg
22
 
23
- RUN echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/debian bookworm/mongodb-org/8.0 main" \
24
- > /etc/apt/sources.list.d/mongodb-org-8.0.list
 
 
 
 
25
 
26
- RUN apt-get update && apt-get install -y \
27
- mongodb-org \
28
- mongodb-mongosh \
29
- mongodb-database-tools \
30
- && rm -rf /var/lib/apt/lists/*
31
-
32
- RUN mongod --version
33
- RUN mongosh --version
34
- RUN mongodump --version
35
 
36
  COPY --chown=user . /app
37
 
 
11
 
12
  RUN apt-get update && apt-get install -y \
13
  curl \
 
14
  ca-certificates \
15
+ tar \
16
+ gzip \
17
  procps \
18
+ libcurl4 \
19
+ libgssapi-krb5-2 \
20
+ libwrap0 \
21
+ libsasl2-2 \
22
+ libsasl2-modules \
23
+ libsasl2-modules-gssapi-mit \
24
+ openssl \
25
+ liblzma5 \
26
+ libldap-2.5-0 \
27
+ libldap-common \
28
  && rm -rf /var/lib/apt/lists/*
29
 
30
+ ARG MONGO_VERSION=7.0.24
31
+ ARG MONGO_TARBALL_URL=https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-${MONGO_VERSION}.tgz
32
 
33
+ RUN curl -fsSL "${MONGO_TARBALL_URL}" -o /tmp/mongodb.tgz \
34
+ && tar -xzf /tmp/mongodb.tgz -C /opt \
35
+ && ln -s /opt/mongodb-linux-x86_64-ubuntu2204-${MONGO_VERSION} /opt/mongodb \
36
+ && ln -s /opt/mongodb/bin/mongod /usr/local/bin/mongod \
37
+ && ln -s /opt/mongodb/bin/mongos /usr/local/bin/mongos \
38
+ && rm /tmp/mongodb.tgz
39
 
40
+ RUN test -x /usr/local/bin/mongod
 
 
 
 
 
 
 
 
41
 
42
  COPY --chown=user . /app
43