Skip to content

Commit

Permalink
Build Mongodb-backup Image and store backup in aws s3 and azure storage
Browse files Browse the repository at this point in the history
  • Loading branch information
Deepak Tiwari committed Aug 9, 2023
1 parent e26f170 commit 6153315
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions mongodb-backup/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM ubuntu:22.04@sha256:965fbcae990b0467ed5657caceaec165018ef44a4d2d46c7cdea80a9dff0d1ea

RUN apt-get -y update && apt-get -y install --no-install-recommends python3 python3-pymongo curl wget awscli gcc musl-dev python3-dev libffi-dev cargo make pip

RUN wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.6.1.deb -O /tmp/mongodb-tools.deb && \
dpkg -i /tmp/mongodb-tools.deb && \
rm /tmp/mongodb-tools.deb

RUN pip install --upgrade pip
RUN pip install azure-cli
RUN mkdir /backup /tiw

ENV S3_PATH=mongodb AWS_DEFAULT_REGION=us-east-1

COPY ./mongodb-backup/script/entrypoint.sh /usr/local/bin/entrypoint
COPY ./mongodb-backup/script/backup.sh /usr/local/bin/backup
COPY ./mongodb-backup/script/mongouri.py /usr/local/bin/mongouri

RUN chmod 775 /usr/local/bin/entrypoint
RUN chmod 775 /usr/local/bin/backup
RUN chmod 775 /usr/local/bin/mongouri

VOLUME /backup

CMD /usr/local/bin/entrypoint

0 comments on commit 6153315

Please sign in to comment.