Skip to content

Commit

Permalink
Update docker container for backup db
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Nov 1, 2023
1 parent 90b8fc9 commit 3cd3302
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions images/backup-restore/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
FROM python:3.9.9
RUN apt-get update
RUN apt-get install -y \
curl \
postgresql-client
FROM python:3.9.9-slim

# Install AWS CLI
RUN pip install awscli
# Install Postgres client, GCP CLI, and Azure CLI
RUN apt-get update \
&& apt-get install -y curl apt-transport-https lsb-release gnupg \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& curl -L https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& curl -sL https://aka.ms/InstallAzureCLIDeb | bash \
&& apt-get update \
&& apt-get install -y postgresql-client-14 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install GCP CLI
RUN curl -sSL https://sdk.cloud.google.com | bash
RUN ln -f -s /root/google-cloud-sdk/bin/gsutil /usr/bin/gsutil
RUN curl -sSL https://sdk.cloud.google.com | bash \
&& ln -f -s /root/google-cloud-sdk/bin/gsutil /usr/bin/gsutil
RUN rm -rf /root/google-cloud-sdk/.install/.backup

# Install Azure CLI
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
# Install AWS CLI
RUN pip install awscli

VOLUME /mnt/data
COPY ./start.sh /
CMD /start.sh
CMD ["/start.sh"]

0 comments on commit 3cd3302

Please sign in to comment.