Skip to content

Commit ded822d

Browse files
committed
🐛 Fix installing AWS CLI
1 parent 718a3d7 commit ded822d

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

Dockerfile

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
FROM mongo:8.0.6
22

3-
# Install AWS CLI
3+
# Install dependencies and AWS CLI
44
RUN apt-get update && \
55
apt-get install -y \
66
python3 \
7-
python3-pip \
7+
python3-venv \
88
curl \
99
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
1220
apt-get clean && \
1321
rm -rf /var/lib/apt/lists/*
1422

@@ -17,11 +25,7 @@ COPY backup.sh /usr/local/bin/
1725
RUN chmod +x /usr/local/bin/backup.sh
1826

1927
# 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"
2529
ENV S3_BUCKET=""
2630
ENV S3_PREFIX="mongodb-backups"
2731
ENV AWS_ACCESS_KEY_ID=""

0 commit comments

Comments
 (0)