dnp-harbor/services/php70/Dockerfile
2024-11-22 11:25:11 +08:00

33 lines
826 B
Docker

ARG PHP_VERSION
FROM ${PHP_VERSION}
ARG TZ
ARG PHP_EXTENSIONS
ARG CONTAINER_PACKAGE_URL
COPY ./extensions /tmp/extensions
WORKDIR /tmp/extensions
RUN chmod +x install.sh \
&& sh install.sh
# RUN rm -fr /tmp/extensions
# 添加社区仓库 经测试3.5可以
RUN echo "http://${CONTAINER_PACKAGE_URL}/alpine/v3.5/community" >> /etc/apk/repositories
RUN apk update && apk add --no-cache iputils
RUN apk add --no-cache openssl && apk --no-cache add libzip-dev \
&& docker-php-ext-configure zip --with-libzip=/usr/include \
&& docker-php-ext-install zip
RUN apk update && apk --no-cache add shadow
# php image's www-data user uid & gid are 82, change them to 1000 (primary user)
# RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
# Use www-data to run the first process
USER www-data
WORKDIR /www