Used alpine as a based image

This commit is contained in:
2022-08-05 12:41:23 +03:00
parent 7ae9de7c6c
commit 80c9dc8f0f
2 changed files with 8 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
FROM python:3.10-slim-bullseye
FROM alpine:3.16
ENV HOME=/home/app \
APP_HOME=/home/app/docker-postgres-backup \
@@ -18,15 +18,13 @@ ENV HOME=/home/app \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
RUN apt-get update && apt-get install -y --no-install-recommends locales postgresql-client-13 tini && \
apt-get -y --purge autoremove && apt-get clean && rm -rf /var/cache/apt && \
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen && pip install -U pip
RUN apk --no-cache add postgresql13-client python3 py3-pip tini
COPY ./ $APP_HOME
WORKDIR $APP_HOME
RUN python -m pip install $APP_HOME
RUN python3 -m pip install $APP_HOME
ENTRYPOINT ["tini", "--"]
CMD ["python", "start.py"]
CMD ["python3", "start.py"]