Skip to content

Docker Compose

Categories: docker

Renovate supports updating Docker Compose dependencies.

File Matching

By default, Renovate will check any files matching the following regular expression: /(^|/)(?:docker-)?compose[^/]*\.ya?ml$/.

For details on how to extend a manager's managerFilePatterns value, please follow this link.

Supported datasources

This manager supports extracting the following datasources: docker.

Dependency types

This manager has no documented depType values.

Default config

{
  "managerFilePatterns": [
    "/(^|/)(?:docker-)?compose[^/]*\\.ya?ml$/"
  ]
}

Additional Information

Extracts all Docker images from with Docker Compose YAML files.

If you need to change the versioning format, read the versioning documentation to learn more.

Registry aliases with variable defaults

Docker Compose files often use environment variables with default values:

services:
  foobar:
    image: ${CI_REGISTRY:-}image:1.0

To handle these variables, configure registry aliases with the default value syntax:

{
  "registryAliases": {
    "${CI_REGISTRY:-}": "my-registry.io"
  }
}

Both image reference formats work:

  • With a slash after the variable: ${CI_REGISTRY:-}/image:1.0
  • Without a slash after the variable: ${CI_REGISTRY:-}image:1.0

The alias value works with or without a trailing slash.