build from inception
This commit is contained in:
67
srcs/requirements/wordpress/Dockerfile
Normal file
67
srcs/requirements/wordpress/Dockerfile
Normal file
@@ -0,0 +1,67 @@
|
||||
# debian -----------------------------------------------------
|
||||
|
||||
# FROM debian:buster
|
||||
#
|
||||
# # 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/*
|
||||
#
|
||||
# # fpm config
|
||||
# COPY ./conf/www.conf /etc/php/7.3/fpm/pool.d/
|
||||
# RUN mkdir /run/php/
|
||||
#
|
||||
# ENV PHP_VERSION="php-fpm7.3"
|
||||
|
||||
# alpine -----------------------------------------------------
|
||||
|
||||
FROM alpine:3.15
|
||||
|
||||
# bash and vim for debug
|
||||
RUN apk update && apk add \
|
||||
php7 \
|
||||
php7-fpm \
|
||||
php7-mysqli \
|
||||
php7-phar \
|
||||
php7-json \
|
||||
php7-iconv \
|
||||
mariadb-client \
|
||||
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}
|
||||
|
||||
# MAP for creation of map plugin
|
||||
COPY ./conf/map_prof/ ${WP_DIR}/wp-content/plugins/map_prof
|
||||
# modify .htaccess
|
||||
COPY ./conf/htaccess ${WP_DIR}/.htaccess
|
||||
|
||||
# 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
|
||||
|
||||
COPY ./conf/wp_entrypoint.sh ./
|
||||
|
||||
ENTRYPOINT [ "sh", "wp_entrypoint.sh" ]
|
||||
|
||||
Reference in New Issue
Block a user