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

Co-authored-by: Rhys Arkins <rhys@arkins.net>
This commit is contained in:
Liora Milbaum 2023-03-10 07:37:14 +02:00 committed by GitHub
parent 29e865aee1
commit bcb61d5360
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 6 deletions

View file

@ -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];

View file

@ -1,10 +1,10 @@
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

View file

@ -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',