Skip to content

Plugin: updater-docker

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

Terminal window
semrel plugin install @semrel/docker

semrel plugin install downloads the binary to .semrel/plugins/ and updates .semrel.lock. Commit .semrel.lock to pin the version for your team.

version: 1
plugins:
- uses: @semrel/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.