From 7e973c72190eae1b3daf7e084f90554b87c3d5ab Mon Sep 17 00:00:00 2001 From: Niklas Engvall Date: Fri, 23 Dec 2022 12:18:00 +0100 Subject: [PATCH 1/2] bump alpine to 3.15 --- docker/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index f0a0731..2b02353 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.13 AS builder +FROM alpine:3.15 AS builder ARG BUILD_DEPENDENCIES="build-base \ libffi-dev \ @@ -65,12 +65,12 @@ RUN mkdir -p /app && \ cp -r /build/configs/docker_config.py /app/configs # Build image -FROM alpine:3.13 +FROM alpine:3.15 ENV FLASK_APP=/app/powerdnsadmin/__init__.py \ USER=pda -RUN apk add --no-cache mariadb-connector-c postgresql-client py3-gunicorn py3-psycopg2 xmlsec tzdata libcap && \ +RUN apk add --no-cache mariadb-connector-c postgresql-client py3-gunicorn py3-pyldap py3-flask py3-psycopg2 xmlsec tzdata libcap && \ addgroup -S ${USER} && \ adduser -S -D -G ${USER} ${USER} && \ mkdir /data && \ @@ -79,7 +79,7 @@ RUN apk add --no-cache mariadb-connector-c postgresql-client py3-gunicorn py3-ps apk del libcap COPY --from=builder /usr/bin/flask /usr/bin/ -COPY --from=builder /usr/lib/python3.8/site-packages /usr/lib/python3.8/site-packages/ +COPY --from=builder /usr/lib/python3.9/site-packages /usr/lib/python3.9/site-packages/ COPY --from=builder --chown=root:${USER} /app /app/ COPY ./docker/entrypoint.sh /usr/bin/ From 4de7bbe354387623c9abc4e4252a266a34782d92 Mon Sep 17 00:00:00 2001 From: Niklas Engvall Date: Fri, 6 Jan 2023 16:43:48 +0100 Subject: [PATCH 2/2] Use alpine 3.17 as base + pip fix to remove warnings --- docker/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 2b02353..e9905d6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.15 AS builder +FROM alpine:3.17 AS builder ARG BUILD_DEPENDENCIES="build-base \ libffi-dev \ @@ -29,7 +29,7 @@ COPY ./requirements.txt /build/requirements.txt # Get application dependencies RUN pip install --upgrade pip && \ - pip install -r requirements.txt + pip install --use-pep517 -r requirements.txt # Add sources COPY . /build @@ -65,7 +65,7 @@ RUN mkdir -p /app && \ cp -r /build/configs/docker_config.py /app/configs # Build image -FROM alpine:3.15 +FROM alpine:3.17 ENV FLASK_APP=/app/powerdnsadmin/__init__.py \ USER=pda @@ -79,7 +79,7 @@ RUN apk add --no-cache mariadb-connector-c postgresql-client py3-gunicorn py3-py apk del libcap COPY --from=builder /usr/bin/flask /usr/bin/ -COPY --from=builder /usr/lib/python3.9/site-packages /usr/lib/python3.9/site-packages/ +COPY --from=builder /usr/lib/python3.10/site-packages /usr/lib/python3.10/site-packages/ COPY --from=builder --chown=root:${USER} /app /app/ COPY ./docker/entrypoint.sh /usr/bin/