Skip to content

Dynamic Dockerfile? ARGS? possible? Worth doing?  #39

@joemaller

Description

@joemaller

We could use env vars for the WordPress and PHP versions to build the desired image, something like:

ARG WP_VERSION=5
ARG PHP_VERSION=8-apache

ARG BASE_IMAGE=wordpress:${WP_VERSION}-php${PHP_VERSION}

# $BASE_IMAGE will be something like `wordpress:5.9.1-php8.0-apache`
# and would fallback to wordpress:5-php8-apache
FROM $BASE_IMAGE

Can these pull from the environment? Config in package.json?

References:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions