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

Update to use alpine:15 #467

Merged
merged 1 commit into from
Feb 25, 2022
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
19 changes: 2 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,11 @@
# build (build from source), prebuilt (use copy from last release image)
ARG BUILD_SOURCE=build

FROM alpine:3.12 AS alpine
FROM alpine:3.15 AS alpine

FROM alpine AS base
ENV PHP_INI_DIR /etc/php7

# ext-mongodb: build and stage
FROM base AS build-ext-mongodb
RUN apk add --no-cache alpine-sdk openssl-dev php7-dev php7-openssl php7-pear
RUN pecl install mongodb

FROM base AS stage-ext-mongodb
RUN apk add binutils

WORKDIR /build/etc/php7/conf.d
RUN echo extension=mongodb.so > mongodb.ini

WORKDIR /build/usr/lib/php7/modules
COPY --from=build-ext-mongodb /usr/lib/php7/modules/mongodb.so .
RUN strip *.so && chmod a+rx *.so

# php-fpm runtime
FROM base AS php-build
RUN set -x \
Expand All @@ -42,6 +27,7 @@ RUN set -x \
php-phar \
php-session \
php-simplexml \
php7-pecl-mongodb \
# Use www-data uid from alpine also present in docker php images
&& adduser -u 82 -D -S -G www-data www-data \
# Tweak php-fpm config
Expand Down Expand Up @@ -112,7 +98,6 @@ RUN install -d /cache -m 700

# runtime image from current build
FROM php AS runtime-build
COPY --from=stage-ext-mongodb /build /

ARG APPDIR=/var/www/xhgui
ARG WEBROOT=$APPDIR/webroot
Expand Down