Skip to content

Commit

Permalink
feat(config): default dockerImagePrefix to containerbase (#20150)
Browse files Browse the repository at this point in the history
Co-authored-by: HonkingGoose <[email protected]>
  • Loading branch information
2 people authored and rarkins committed Feb 23, 2023
1 parent 88cb161 commit 81c0531
Show file tree
Hide file tree
Showing 27 changed files with 105 additions and 103 deletions.
12 changes: 6 additions & 6 deletions docs/usage/self-hosted-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,9 @@ You can skip the host part, and use just the datasource and credentials.

Adds a custom prefix to the default Renovate sidecar Docker containers name and label.

For example, if you set `dockerChildPrefix=myprefix_` then the final container created from the `renovate/node` is:
For example, if you set `dockerChildPrefix=myprefix_` then the final container created from the `containerbase/sidecar` is:

- called `myprefix_node` instead of `renovate_node`
- called `myprefix_sidecar` instead of `renovate_sidecar`
- labeled `myprefix_child` instead of `renovate_child`

<!-- prettier-ignore -->
Expand All @@ -313,19 +313,19 @@ For example, if you set `dockerChildPrefix=myprefix_` then the final container c

## dockerImagePrefix

By default Renovate pulls the sidecar Docker containers from `docker.io/renovate`.
By default Renovate pulls the sidecar Docker containers from `docker.io/containerbase`.
You can use the `dockerImagePrefix` option to override this default.

Say you want to pull your images from `ghcr.io/renovatebot`.
Say you want to pull your images from `ghcr.io/containerbase` to bypass Docker Hub limits.
You would put this in your configuration file:

```json
{
"dockerImagePrefix": "ghcr.io/renovatebot"
"dockerImagePrefix": "ghcr.io/containerbase"
}
```

If you pulled a new `node` image, the final image would be `ghcr.io/renovatebot/node` instead of `docker.io/renovate/node`.
Now when Renovate pulls a new `sidecar` image, the final image is `ghcr.io/containerbase/sidecar` instead of `docker.io/containerbase/sidecar`.

## dockerUser

Expand Down
2 changes: 1 addition & 1 deletion lib/config/options/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ const options: RenovateOptions[] = [
description:
'Change this value to override the default Renovate Docker sidecar image name prefix.',
type: 'string',
default: 'docker.io/renovate',
default: 'docker.io/containerbase',
globalOnly: true,
},
{
Expand Down
28 changes: 14 additions & 14 deletions lib/modules/manager/bundler/artifacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ describe('modules/manager/bundler/artifacts', () => {
})
).toEqual([updatedGemfileLock]);
expect(execSnapshots).toMatchObject([
{ cmd: 'docker pull renovate/sidecar' },
{ cmd: 'docker pull containerbase/sidecar' },
{ cmd: 'docker ps --filter name=renovate_sidecar -aq' },
{
cmd:
Expand All @@ -291,7 +291,7 @@ describe('modules/manager/bundler/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar' +
'containerbase/sidecar' +
' bash -l -c "' +
'install-tool ruby 1.2.0' +
' && ' +
Expand Down Expand Up @@ -340,7 +340,7 @@ describe('modules/manager/bundler/artifacts', () => {
})
).toEqual([updatedGemfileLock]);
expect(execSnapshots).toMatchObject([
{ cmd: 'docker pull renovate/sidecar' },
{ cmd: 'docker pull containerbase/sidecar' },
{ cmd: 'docker ps --filter name=renovate_sidecar -aq' },
{
cmd:
Expand All @@ -351,7 +351,7 @@ describe('modules/manager/bundler/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar' +
'containerbase/sidecar' +
' bash -l -c "' +
'install-tool ruby 1.2.5' +
' && ' +
Expand Down Expand Up @@ -402,7 +402,7 @@ describe('modules/manager/bundler/artifacts', () => {
})
).toEqual([updatedGemfileLock]);
expect(execSnapshots).toMatchObject([
{ cmd: 'docker pull renovate/sidecar' },
{ cmd: 'docker pull containerbase/sidecar' },
{ cmd: 'docker ps --filter name=renovate_sidecar -aq' },
{
cmd:
Expand All @@ -413,7 +413,7 @@ describe('modules/manager/bundler/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar' +
'containerbase/sidecar' +
' bash -l -c "' +
'install-tool ruby 1.3.0' +
' && ' +
Expand Down Expand Up @@ -463,7 +463,7 @@ describe('modules/manager/bundler/artifacts', () => {
})
).toEqual([updatedGemfileLock]);
expect(execSnapshots).toMatchObject([
{ cmd: 'docker pull renovate/sidecar' },
{ cmd: 'docker pull containerbase/sidecar' },
{ cmd: 'docker ps --filter name=renovate_sidecar -aq' },
{
cmd:
Expand All @@ -475,7 +475,7 @@ describe('modules/manager/bundler/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar' +
'containerbase/sidecar' +
' bash -l -c "' +
'install-tool ruby 1.2.0' +
' && ' +
Expand Down Expand Up @@ -534,7 +534,7 @@ describe('modules/manager/bundler/artifacts', () => {
})
).toEqual([updatedGemfileLock]);
expect(execSnapshots).toMatchObject([
{ cmd: 'docker pull renovate/sidecar' },
{ cmd: 'docker pull containerbase/sidecar' },
{ cmd: 'docker ps --filter name=renovate_sidecar -aq' },
{
cmd:
Expand All @@ -545,7 +545,7 @@ describe('modules/manager/bundler/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar' +
'containerbase/sidecar' +
' bash -l -c "' +
'install-tool ruby 1.2.0' +
' && ' +
Expand Down Expand Up @@ -606,7 +606,7 @@ describe('modules/manager/bundler/artifacts', () => {
})
).toEqual([updatedGemfileLock]);
expect(execSnapshots).toMatchObject([
{ cmd: 'docker pull renovate/sidecar' },
{ cmd: 'docker pull containerbase/sidecar' },
{ cmd: 'docker ps --filter name=renovate_sidecar -aq' },
{
cmd:
Expand All @@ -617,7 +617,7 @@ describe('modules/manager/bundler/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar' +
'containerbase/sidecar' +
' bash -l -c "' +
'install-tool ruby 1.2.0' +
' && ' +
Expand Down Expand Up @@ -677,7 +677,7 @@ describe('modules/manager/bundler/artifacts', () => {
})
).toEqual([updatedGemfileLock]);
expect(execSnapshots).toMatchObject([
{ cmd: 'docker pull renovate/sidecar' },
{ cmd: 'docker pull containerbase/sidecar' },
{ cmd: 'docker ps --filter name=renovate_sidecar -aq' },
{
cmd:
Expand All @@ -688,7 +688,7 @@ describe('modules/manager/bundler/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar' +
'containerbase/sidecar' +
' bash -l -c "' +
'install-tool ruby 1.2.0' +
' && ' +
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/manager/cargo/artifacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ describe('modules/manager/cargo/artifacts', () => {
},
]);
expect(execSnapshots).toMatchObject([
{ cmd: 'docker pull renovate/sidecar' },
{ cmd: 'docker pull containerbase/sidecar' },
{},
{
cmd:
Expand All @@ -220,7 +220,7 @@ describe('modules/manager/cargo/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar ' +
'containerbase/sidecar ' +
'bash -l -c "' +
'install-tool rust 1.65.0' +
' && ' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ exports[`modules/manager/cocoapods/artifacts returns pod exec error 1`] = `
exports[`modules/manager/cocoapods/artifacts returns updated Podfile 1`] = `
[
{
"cmd": "docker pull renovate/sidecar",
"cmd": "docker pull containerbase/sidecar",
"options": {
"encoding": "utf-8",
},
},
{
"cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" renovate/sidecar bash -l -c "install-tool ruby 3.1.0 && install-tool cocoapods 3.1.0 && gem install cocoapods-acknowledgements && pod install"",
"cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" containerbase/sidecar bash -l -c "install-tool ruby 3.1.0 && install-tool cocoapods 3.1.0 && gem install cocoapods-acknowledgements && pod install"",
"options": {
"cwd": "/tmp/github/some/repo",
"encoding": "utf-8",
Expand All @@ -88,13 +88,13 @@ exports[`modules/manager/cocoapods/artifacts returns updated Podfile 1`] = `
exports[`modules/manager/cocoapods/artifacts returns updated Podfile and Pods files 1`] = `
[
{
"cmd": "docker pull renovate/sidecar",
"cmd": "docker pull containerbase/sidecar",
"options": {
"encoding": "utf-8",
},
},
{
"cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" renovate/sidecar bash -l -c "install-tool ruby 3.1.0 && install-tool cocoapods 3.1.0 && pod install"",
"cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" containerbase/sidecar bash -l -c "install-tool ruby 3.1.0 && install-tool cocoapods 3.1.0 && pod install"",
"options": {
"cwd": "/tmp/github/some/repo",
"encoding": "utf-8",
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/manager/cocoapods/artifacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ describe('modules/manager/cocoapods/artifacts', () => {
config,
});
expect(execSnapshots).toMatchObject([
{ cmd: 'docker pull renovate/sidecar' },
{ cmd: 'docker pull containerbase/sidecar' },
{
cmd:
'docker run --rm --name=renovate_sidecar --label=renovate_child ' +
Expand All @@ -261,7 +261,7 @@ describe('modules/manager/cocoapods/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar' +
'containerbase/sidecar' +
' bash -l -c "' +
'install-tool ruby 3.1.0' +
' && ' +
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/manager/composer/artifacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ describe('modules/manager/composer/artifacts', () => {
]);
expect(execSnapshots).toMatchObject([
{
cmd: 'docker pull renovate/sidecar',
cmd: 'docker pull containerbase/sidecar',
options: {
encoding: 'utf-8',
},
Expand All @@ -481,7 +481,7 @@ describe('modules/manager/composer/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar' +
'containerbase/sidecar' +
' bash -l -c "' +
'install-tool php 7.3' +
' && ' +
Expand Down
26 changes: 13 additions & 13 deletions lib/modules/manager/gomod/artifacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ describe('modules/manager/gomod/artifacts', () => {
},
]);
expect(execSnapshots).toMatchObject([
{ cmd: 'docker pull renovate/sidecar' },
{ cmd: 'docker pull containerbase/sidecar' },
{ cmd: 'docker ps --filter name=renovate_sidecar -aq' },
{
cmd:
Expand All @@ -315,7 +315,7 @@ describe('modules/manager/gomod/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar' +
'containerbase/sidecar' +
' bash -l -c "' +
'install-tool golang 1.14.0' +
' && ' +
Expand Down Expand Up @@ -455,7 +455,7 @@ describe('modules/manager/gomod/artifacts', () => {
},
]);
expect(execSnapshots).toMatchObject([
{ cmd: 'docker pull renovate/sidecar' },
{ cmd: 'docker pull containerbase/sidecar' },
{ cmd: 'docker ps --filter name=renovate_sidecar -aq' },
{
cmd:
Expand Down Expand Up @@ -485,7 +485,7 @@ describe('modules/manager/gomod/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar' +
'containerbase/sidecar' +
' bash -l -c "' +
'install-tool golang 1.14.0' +
' && ' +
Expand Down Expand Up @@ -566,7 +566,7 @@ describe('modules/manager/gomod/artifacts', () => {
},
]);
expect(execSnapshots).toMatchObject([
{ cmd: 'docker pull renovate/sidecar' },
{ cmd: 'docker pull containerbase/sidecar' },
{},
{
options: {
Expand Down Expand Up @@ -980,7 +980,7 @@ describe('modules/manager/gomod/artifacts', () => {
{ file: { contents: 'New go.sum 2', path: 'go.mod', type: 'addition' } },
]);
expect(execSnapshots).toMatchObject([
{ cmd: 'docker pull renovate/sidecar' },
{ cmd: 'docker pull containerbase/sidecar' },
{},
{
cmd:
Expand All @@ -997,7 +997,7 @@ describe('modules/manager/gomod/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar' +
'containerbase/sidecar' +
' bash -l -c "' +
'install-tool golang 1.14.0' +
' && ' +
Expand Down Expand Up @@ -1045,7 +1045,7 @@ describe('modules/manager/gomod/artifacts', () => {
{ file: { contents: 'New go.sum 2', path: 'go.mod', type: 'addition' } },
]);
expect(execSnapshots).toMatchObject([
{ cmd: 'docker pull renovate/sidecar' },
{ cmd: 'docker pull containerbase/sidecar' },
{},
{
cmd:
Expand All @@ -1062,7 +1062,7 @@ describe('modules/manager/gomod/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar' +
'containerbase/sidecar' +
' bash -l -c "' +
'install-tool golang 1.14.0' +
' && ' +
Expand Down Expand Up @@ -1683,7 +1683,7 @@ describe('modules/manager/gomod/artifacts', () => {
]);
const expectedResult = [
{
cmd: 'docker pull renovate/sidecar',
cmd: 'docker pull containerbase/sidecar',
},
{},
{
Expand All @@ -1701,7 +1701,7 @@ describe('modules/manager/gomod/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar' +
'containerbase/sidecar' +
' bash -l -c "' +
'install-tool golang 1.17.0' +
' && ' +
Expand Down Expand Up @@ -1757,7 +1757,7 @@ describe('modules/manager/gomod/artifacts', () => {
]);
const expectedResult = [
{
cmd: 'docker pull renovate/sidecar',
cmd: 'docker pull containerbase/sidecar',
},
{},
{
Expand All @@ -1775,7 +1775,7 @@ describe('modules/manager/gomod/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar' +
'containerbase/sidecar' +
' bash -l -c "' +
'install-tool golang 1.14.0' +
' && ' +
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/manager/gradle-wrapper/artifacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ describe('modules/manager/gradle-wrapper/artifacts', () => {
},
]);
expect(execSnapshots).toMatchObject([
{ cmd: 'docker pull renovate/sidecar' },
{ cmd: 'docker pull containerbase/sidecar' },
{ cmd: 'docker ps --filter name=renovate_sidecar -aq' },
{
cmd:
Expand All @@ -209,7 +209,7 @@ describe('modules/manager/gradle-wrapper/artifacts', () => {
'-e BUILDPACK_CACHE_DIR ' +
'-e CONTAINERBASE_CACHE_DIR ' +
'-w "/tmp/github/some/repo" ' +
'renovate/sidecar' +
'containerbase/sidecar' +
' bash -l -c "' +
'install-tool java 11.0.1' +
' && ' +
Expand Down
Loading

0 comments on commit 81c0531

Please sign in to comment.