all three containers works with alpine and user are configured
This commit is contained in:
@@ -1,20 +1,54 @@
|
||||
FROM debian:buster
|
||||
# debian -----------------------------------------------------
|
||||
|
||||
# bash and vim for debug
|
||||
RUN apt update && apt install -y \
|
||||
php7.3 \
|
||||
php7.3-fpm \
|
||||
php7.3-mysqli \
|
||||
mariadb-client \
|
||||
curl \
|
||||
bash vim
|
||||
RUN rm -rf /var/lib/apt/lists/*
|
||||
# FROM debian:buster
|
||||
#
|
||||
# # bash and vim for debug
|
||||
# RUN apt update && apt install -y \
|
||||
# php7.3 \
|
||||
# php7.3-fpm \
|
||||
# php7.3-mysqli \
|
||||
# curl \
|
||||
# bash vim
|
||||
# RUN rm -rf /var/lib/apt/lists/*
|
||||
#
|
||||
# # fpm config
|
||||
# COPY ./conf/www.conf /etc/php/7.3/fpm/pool.d/
|
||||
# RUN mkdir /run/php/
|
||||
#
|
||||
# ENV PHP_VERSION="php-fpm7.3"
|
||||
|
||||
# fpm config
|
||||
COPY ./conf/www.conf /etc/php/7.3/fpm/pool.d/
|
||||
RUN mkdir /run/php/
|
||||
# alpine -----------------------------------------------------
|
||||
|
||||
# install wp-cli : https://make.wordpress.org/cli/handbook/guides/installing/
|
||||
FROM alpine:3.15
|
||||
|
||||
# bash and vim for debug
|
||||
RUN apk update && apk add \
|
||||
php7 \
|
||||
php7-fpm \
|
||||
php7-mysqli \
|
||||
php7-phar \
|
||||
php7-json \
|
||||
curl \
|
||||
bash vim
|
||||
RUN rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# fpm config
|
||||
COPY ./conf/www.conf /etc/php7/php-fpm.d/
|
||||
RUN mkdir /run/php/
|
||||
|
||||
# create wp directory
|
||||
ARG WP_DIR
|
||||
RUN mkdir -p ${WP_DIR}
|
||||
|
||||
# create www-data user and add to group
|
||||
RUN adduser -S www-data && \
|
||||
adduser www-data www-data
|
||||
|
||||
ENV PHP_VERSION="php-fpm7"
|
||||
|
||||
# common -----------------------------------------------------
|
||||
|
||||
# install wp-cli : https://wp-cli.org/#installing
|
||||
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar &&\
|
||||
chmod +x wp-cli.phar && \
|
||||
mv wp-cli.phar /usr/local/bin/wp
|
||||
|
||||
Reference in New Issue
Block a user