Skip to content

Provide defaults for key args in the Dockerfile #12

@freephile

Description

@freephile

Warning

WARN: InvalidDefaultArgInFrom: Default value for ARG gesinn/mediawiki-ci:${MW_VERSION}-php${PHP_VERSION} results in empty or invalid base image name (line 3)

This warning was seen when running make targets from a Semantic MediaWiki checkout - even with an .env file such as below:

# local private overrides for https://github.com/gesinn-it-pub/docker-compose-ci

MW_VERSION=1.43
# list of PHP extensions to install
# PHP_EXTENSIONS="gd mysqli opcache pcntl pdo_mysql xml"
# list of OS packages to install (needed for gd extension)
# OS_PACKAGES="git"
PHP_VERSION=8.1
# DB_TYPE=mysql
# DB_IMAGE="mariadb:10"

# # extensions
# SMW_VERSION=dev-master
# SCRIBUNTO_VERSION=REL1_43

# # Enables "composer update" inside of extension
# COMPOSER_EXT=true

Maybe I did something wrong - because clearly the Semantic MediaWiki Makefile includes .env on line 1 AND goes on to declare and set defaults for the Make variables (which have lower precedence / are supposed to be overridden by .env)

This issue proposes to add default values to the docker-compose-ci Dockerfile variables MW_VERSION and PHP_VERSION on lines 1 and 2 to avoid any warning.

However, this proposal may not be desirable for several reasons:

  1. The issue needs to be confirmed; and perhaps is not reproducible.
  2. There are defaults already in the Makefile, and are assumed to pass to the Dockerfile under normal circumstances.
  3. Developer/Testers should expect to run their builds locally using an .env file or using a CLI override such as make MW_VERSION=1.43 PHP_VERSION=8.2 ci and not be interested in building with a "default" image that only gets stale quickly.

If this issue in not reproducible; or is not desirable, please close it.

Metadata

Metadata

Assignees

No one assigned

    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