Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert to bookworm based python image as it is smaller #118

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11.5-alpine AS base
FROM python:3.11.5-slim-bookworm AS base
ENV PYTHONUNBUFFERED=1
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
ENV ROOT_MODE="false"
Expand All @@ -7,9 +7,9 @@ ENV FOLDER_PATH="/var/lib/backuper"
ENV LOG_FOLDER_PATH="/var/log/backuper"
WORKDIR ${FOLDER_PATH}

RUN apk update && apk add wget unzip postgresql-client mariadb-client mariadb-connector-c runuser build-base libffi-dev
RUN addgroup --gid 1001 --system $SERVICE_NAME && \
adduser -D -G $SERVICE_NAME --shell /bin/false --uid 1001 $SERVICE_NAME
RUN apt-get -y update && apt-get -y install wget unzip postgresql-client mariadb-client
RUN addgroup --gid 1001 --system ${SERVICE_NAME} && \
adduser --gid 1001 --shell /bin/false --disabled-password --uid 1001 ${SERVICE_NAME}

FROM base as poetry
RUN pip install poetry==1.5.1
Expand Down Expand Up @@ -42,7 +42,6 @@ COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
ENTRYPOINT ["/bin/sh", "/docker_entrypoint.sh"]

FROM common AS build
RUN apk del build-base libffi-dev
CMD ["python", "-m", "backuper.main"]

FROM common AS tests
Expand Down