Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config): default dockerImagePrefix to containerbase #20150

Merged
merged 3 commits into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/usage/self-hosted-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
viceice marked this conversation as resolved.
Show resolved Hide resolved
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`.
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`.
If you pulled a new `sidecar` image, the final image would be `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
4 changes: 3 additions & 1 deletion lib/util/exec/docker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ export async function generateDockerCommand(
result.push(`-w "${cwd}"`);
}

image = `${ensureTrailingSlash(dockerImagePrefix ?? 'renovate')}${image}`;
image = `${ensureTrailingSlash(
dockerImagePrefix ?? 'containerbase'
)}${image}`;

// TODO: add constraint: const tag = getDockerTag(image, sideCarImageVersion, 'semver');
logger.debug(
Expand Down
6 changes: 3 additions & 3 deletions lib/util/exec/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,9 @@ describe('util/exec/index', () => {
inCmd,
inOpts: { docker },
outCmd: [
`docker pull ghcr.io/renovatebot/${image}`,
`docker pull ghcr.io/containerbase/${image}`,
dockerRemoveCmd,
`docker run --rm --name=${name} --label=renovate_child ${defaultVolumes} -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "${cwd}" ghcr.io/renovatebot/${image} bash -l -c "${inCmd}"`,
`docker run --rm --name=${name} --label=renovate_child ${defaultVolumes} -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "${cwd}" ghcr.io/containerbase/${image} bash -l -c "${inCmd}"`,
],
outOpts: [
dockerPullOpts,
Expand All @@ -413,7 +413,7 @@ describe('util/exec/index', () => {
},
],
adminConfig: {
dockerImagePrefix: 'ghcr.io/renovatebot',
dockerImagePrefix: 'ghcr.io/containerbase',
binarySource: 'docker',
},
},
Expand Down