Page MenuHomePhabricator

[mwcli docker] Document how to user Dockerfile overrides for mediawiki service
Open, HighPublic

Event Timeline

In https://gitlab.wikimedia.org/repos/releng/cli/-/merge_requests/649 there is a nice little workflow for this tbh!

mw dev mw image dockerfile
Manage a custom Dockerfile used to build the service image locally.

Three options exist for sourcing a service image:

  1. Default          Use the image bundled with the compose file (no override).
  2. Custom image     Pull a pre-built image: `image set <image>`
  3. Custom Dockerfile  Build an image locally from your own Dockerfile: `image dockerfile set <path>`

When a Dockerfile is set, a docker compose override file is generated automatically.
Running "create" (or "docker compose up") will build the image before starting the
service.  Use "image dockerfile reset" to go back to the default image.

Usage:
  mw docker mediawiki image dockerfile [command]

Available Commands:
  cat         Print the contents of the configured Dockerfile
  edit        Open the configured Dockerfile in your editor
  get         Show the path of the Dockerfile currently configured for this service
  reset       Remove the custom Dockerfile override and revert to the default image
  set         Activate a custom Dockerfile for this service

Global Flags:
  -c, --context string   The context to use (default "default")
      --help             Help for this command
      --no-interaction   Do not ask any interactive questions
  -v, --verbose count    Increase output verbosity. Example: --verbose=2 or -vv

Use "mw docker mediawiki image dockerfile [command] --help" for more information about a command.

you can make one, and then mw dev mw create --build