-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docker container for backup db
- Loading branch information
Rub21
committed
Nov 1, 2023
1 parent
90b8fc9
commit 3cd3302
Showing
1 changed file
with
17 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |