Add WP-CLI to Dockerfile, remove exposed MariaDB port

This commit is contained in:
2025-12-17 12:38:38 +01:00
parent 1e692e2d9b
commit 88f5d9bfb2
2 changed files with 6 additions and 4 deletions

View File

@@ -11,13 +11,17 @@ ENV PHP_MEMORY_LIMIT=512M
ENV PHP_UPLOAD_MAX_FILE_SIZE=64M
ENV PHP_POST_MAX_SIZE=64M
# Install dependencies
# Install dependencies + WP-CLI
USER root
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
unzip \
curl \
&& rm -rf /var/lib/apt/lists/*
less \
mariadb-client \
&& rm -rf /var/lib/apt/lists/* \
&& curl -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
&& chmod +x /usr/local/bin/wp
# Copy application
USER www-data

View File

@@ -41,8 +41,6 @@ services:
- mariadb_data:/var/lib/mysql
networks:
- internal
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 30s