File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change 1
1
FROM mongo:8.0.6
2
2
3
- # Install AWS CLI
3
+ # Install dependencies and AWS CLI
4
4
RUN apt-get update && \
5
5
apt-get install -y \
6
6
python3 \
7
- python3-pip \
7
+ python3-venv \
8
8
curl \
9
9
unzip \
10
- && \
11
- pip3 install --no-cache-dir awscli==1.27.33 && \
10
+ ca-certificates && \
11
+ # Download and install AWS CLI in a custom location
12
+ mkdir -p /tmp/awscli && \
13
+ cd /tmp/awscli && \
14
+ curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip" && \
15
+ unzip awscliv2.zip && \
16
+ ./aws/install && \
17
+ cd / && \
18
+ rm -rf /tmp/awscli && \
19
+ # Clean up
12
20
apt-get clean && \
13
21
rm -rf /var/lib/apt/lists/*
14
22
@@ -17,11 +25,7 @@ COPY backup.sh /usr/local/bin/
17
25
RUN chmod +x /usr/local/bin/backup.sh
18
26
19
27
# Set environment variables with defaults (can be overridden)
20
- ENV MONGODB_HOST="localhost"
21
- ENV MONGODB_PORT="27017"
22
- ENV MONGODB_USERNAME=""
23
- ENV MONGODB_PASSWORD=""
24
- ENV MONGODB_AUTH_DB="admin"
28
+ ENV MONGODB_URI="mongodb://localhost:27017"
25
29
ENV S3_BUCKET=""
26
30
ENV S3_PREFIX="mongodb-backups"
27
31
ENV AWS_ACCESS_KEY_ID=""
You can’t perform that action at this time.
0 commit comments