Skip to content
Snippets Groups Projects
Unverified Commit bcb61d53 authored by Liora Milbaum's avatar Liora Milbaum Committed by GitHub
Browse files

feat(manager/dockerfile): match Containerfile (#20804)


Co-authored-by: default avatarRhys Arkins <rhys@arkins.net>
parent 29e865ae
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,10 @@ export const language: ProgrammingLanguage = 'docker'; ...@@ -7,7 +7,10 @@ export const language: ProgrammingLanguage = 'docker';
export { extractPackageFile }; export { extractPackageFile };
export const defaultConfig = { export const defaultConfig = {
fileMatch: ['(^|/|\\.)Dockerfile$', '(^|/)Dockerfile[^/]*$'], fileMatch: [
'(^|/|\\.)(Docker|Container)file$',
'(^|/)(Docker|Container)file[^/]*$',
],
}; };
export const supportedDatasources = [DockerDatasource.id]; export const supportedDatasources = [DockerDatasource.id];
Extracts all Docker images in a `Dockerfile`. Extracts image references in a `Dockerfile` and/or `Containerfile`.
Renovate's managers does not understand versioning, that's up to Renovate's versioning modules. Renovate's managers does not understand versioning, that's up to Renovate's versioning modules.
The default Docker versioning for Docker datasources treats suffixes as "compatibility", for example: `-alpine`. The default `docker` versioning for container image datasources treats suffixes as "compatibility", for example: `-alpine`.
Many Docker images are _not_ SemVer compliant because they use such suffixes in their tags. Many container images are _not_ SemVer compliant because they use such suffixes in their tags.
If Renovate does not update your Dockerfile images correctly, you may need to tell Renovate what versioning it should use. If Renovate does not update your container images correctly, you may need to tell Renovate what versioning it should use.
For example, if you know that an image follows SemVer, you can tell Renovate to use `"semver"` versioning for that image: For example, if you know that an image follows SemVer, you can tell Renovate to use `"semver"` versioning for that image:
```json ```json
......
...@@ -99,7 +99,10 @@ describe('workers/repository/extract/extract-fingerprint-config', () => { ...@@ -99,7 +99,10 @@ describe('workers/repository/extract/extract-fingerprint-config', () => {
).toEqual({ ).toEqual({
enabled: true, enabled: true,
fileList: [], fileList: [],
fileMatch: ['(^|/|\\.)Dockerfile$', '(^|/)Dockerfile[^/]*$'], fileMatch: [
'(^|/|\\.)(Docker|Container)file$',
'(^|/)(Docker|Container)file[^/]*$',
],
ignorePaths: ['**/node_modules/**', '**/bower_components/**'], ignorePaths: ['**/node_modules/**', '**/bower_components/**'],
includePaths: [], includePaths: [],
manager: 'dockerfile', manager: 'dockerfile',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment