Adds dynamic ARG for Dockerfile FROM

This commit is contained in:
Jonathan Rosenbaum 2025-06-05 18:36:08 +00:00
parent e98d4189de
commit 2c5d0b01b9
2 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,8 @@
# Wordpress - make a copy of wp-includes to compare with existing volumes # Wordpress - make a copy of wp-includes to compare with existing volumes
# 'docker-compose exec wordpress bash -c 'cd /var/www/html/wp-includes && grep wp_version version.php' # 'docker-compose exec wordpress bash -c 'cd /var/www/html/wp-includes && grep wp_version version.php'
FROM wordpress:6-fpm ARG WORDPRESS_VERSION=user-defined
FROM wordpress:${WORDPRESS_VERSION}
# ancient debian # ancient debian
#RUN apt update && apt -y install vim less #RUN apt update && apt -y install vim less

View File

@ -7,6 +7,8 @@ services:
build: build:
context: . context: .
dockerfile: Dockerfile.wordpress_fpm dockerfile: Dockerfile.wordpress_fpm
args:
WORDPRESS_VERSION: ${WORDPRESS_VERSION}
image: ${IMAGE_WEB:-web} image: ${IMAGE_WEB:-web}
volumes: volumes:
- html:/var/www/html - html:/var/www/html