Zum Inhalt springen

Plugin: updater-docker

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Updates a version argument inside a Dockerfile. It is useful when your container build embeds the application version through a build argument.

Terminal window
go install github.com/SemRels/updater-docker@latest

Each plugin is a standalone Go binary. Keep it on your PATH or reference it with path: in .semrel.yaml. If you keep secrets in a .env file, load them with semrel --env-file .env release.

version: 1
plugins:
- name: updater-docker
path: updater-docker
args:
file: Dockerfile
arg_name: VERSION
NameRequiredDefaultDescription
SEMREL_PLUGIN_FILEnoDockerfileDockerfile to update.
SEMREL_PLUGIN_ARG_NAMEnoVERSIONDocker build argument that stores the release version.
  • SEMREL_NEXT_VERSION
  • SEMREL_CURRENT_VERSION
  • SEMREL_TAG_NAME
  • SEMREL_DRY_RUN

For a 1.4.0 release, the updater can rewrite ARG VERSION=1.3.2 to ARG VERSION=1.4.0 in the target Dockerfile.