Merge pull request #1343 from trappiz/master

Bump alpine to 3.17 in dockerfile
This commit is contained in:
Matt Scott 2023-01-07 19:28:31 -05:00 committed by GitHub
commit 53f6f3186e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
FROM alpine:3.13 AS builder FROM alpine:3.17 AS builder
ARG BUILD_DEPENDENCIES="build-base \ ARG BUILD_DEPENDENCIES="build-base \
libffi-dev \ libffi-dev \
@ -29,7 +29,7 @@ COPY ./requirements.txt /build/requirements.txt
# Get application dependencies # Get application dependencies
RUN pip install --upgrade pip && \ RUN pip install --upgrade pip && \
pip install -r requirements.txt pip install --use-pep517 -r requirements.txt
# Add sources # Add sources
COPY . /build COPY . /build
@ -65,12 +65,12 @@ RUN mkdir -p /app && \
cp -r /build/configs/docker_config.py /app/configs cp -r /build/configs/docker_config.py /app/configs
# Build image # Build image
FROM alpine:3.13 FROM alpine:3.17
ENV FLASK_APP=/app/powerdnsadmin/__init__.py \ ENV FLASK_APP=/app/powerdnsadmin/__init__.py \
USER=pda 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} && \ addgroup -S ${USER} && \
adduser -S -D -G ${USER} ${USER} && \ adduser -S -D -G ${USER} ${USER} && \
mkdir /data && \ mkdir /data && \
@ -79,7 +79,7 @@ RUN apk add --no-cache mariadb-connector-c postgresql-client py3-gunicorn py3-ps
apk del libcap apk del libcap
COPY --from=builder /usr/bin/flask /usr/bin/ 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.10/site-packages /usr/lib/python3.10/site-packages/
COPY --from=builder --chown=root:${USER} /app /app/ COPY --from=builder --chown=root:${USER} /app /app/
COPY ./docker/entrypoint.sh /usr/bin/ COPY ./docker/entrypoint.sh /usr/bin/