32 lines
936 B
Docker
32 lines
936 B
Docker
FROM:alpine:3.20
|
|
|
|
# Install WordPress and its dependencies
|
|
# The --no-cache option is used to prevent the package manager from caching the downloaded packages
|
|
# rm -rf /var/cache/apk/* is used to remove any cached files after installation
|
|
# This helps to keep the image size small
|
|
RUN apk add --no-cache \
|
|
php83-fpm \
|
|
php83-mysqli \
|
|
php83-mbstring \
|
|
php83-json \
|
|
php83-curl \
|
|
php83-xml \
|
|
php83-zip \
|
|
php83-gd \
|
|
php83-session \
|
|
mariadb-client \
|
|
rm -rf /var/cache/apk/*
|
|
|
|
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
|
|
|
|
RUN mkdir -p /var/www/html && \
|
|
chown -R www-data:www-data /var/www/html
|
|
|
|
|
|
# Copy the entrypoint script and configuration files
|
|
# and set the necessary permissions
|
|
# The entrypoint script will be responsible for initializing the database
|
|
COPY ./docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|