135 lines
No EOL
7.6 KiB
Markdown
135 lines
No EOL
7.6 KiB
Markdown
# Scenario 2: Dockerfile with Dry Run
|
|
|
|
## Overview
|
|
|
|
This scenario demonstrates how Renovate detects outdated versions in a Dockerfile.
|
|
|
|
Take a look at the included [Dockerfile](./Dockerfile).
|
|
|
|
## Run Renovate with some defaults disabled
|
|
|
|
```bash
|
|
npx renovate \
|
|
--platform=local \ # our directory has no git repo (yet)
|
|
--token=<PAT> \ # authorization against GitHub
|
|
--dry-run \ # do not take any actions (create Issues, Pull Requests, etc.)
|
|
--onboarding=false \ # do not create an onboarding PR
|
|
--require-config=ignored \ # do not require a config file
|
|
--base-dir=. # limit discovery to this directory (would default to the entire repository)
|
|
```
|
|
|
|
The log below shows:
|
|
- Renovate **detects the Dockerfile** and one dependency (the base image)
|
|
- Renovate tries to **look up the base image on Docker Hub**, but fails with a 401 Unauthorized error due to no credentials
|
|
- Renovate tries to **update a Dependency Dashboard**: Renovate would [create a GitHub Issue giving an overview of all dependencies](https://github.com/renovatebot/renovate/issues/2958)
|
|
|
|
```bash
|
|
WARN: cli config dryRun property has been changed to full
|
|
INFO: Repository started (repository=local)
|
|
"renovateVersion": "37.440.7"
|
|
INFO: Dependency extraction complete (repository=local)
|
|
"stats": {
|
|
"managers": {"dockerfile": {"fileCount": 1, "depCount": 1}},
|
|
"total": {"fileCount": 1, "depCount": 1}
|
|
}
|
|
INFO: Docker Hub lookup failure (repository=local)
|
|
"err": {
|
|
"name": "HTTPError",
|
|
"code": "ERR_NON_2XX_3XX_RESPONSE",
|
|
"timings": {
|
|
"start": 1775591574057,
|
|
"socket": 1775591574057,
|
|
"lookup": 1775591574057,
|
|
"connect": 1775591574057,
|
|
"secureConnect": 1775591574057,
|
|
"upload": 1775591574057,
|
|
"response": 1775591574166,
|
|
"end": 1775591574167,
|
|
"phases": {
|
|
"wait": 0,
|
|
"dns": 0,
|
|
"tcp": 0,
|
|
"tls": 0,
|
|
"request": 0,
|
|
"firstByte": 109,
|
|
"download": 1,
|
|
"total": 110
|
|
}
|
|
},
|
|
"message": "Response code 401 (Unauthorized)",
|
|
"stack": "HTTPError: Response code 401 (Unauthorized)\n at Request.<anonymous> (/Users/vincent.mahnke/.npm/_npx/05eeecd92f4e18e0/node_modules/got/dist/source/as-promise/index.js:118:42)\n at processTicksAndRejections (node:internal/process/task_queues:104:5)",
|
|
"options": {
|
|
"headers": {
|
|
"user-agent": "RenovateBot/37.440.7 (https://github.com/renovatebot/renovate)",
|
|
"accept": "application/json",
|
|
"authorization": "***********",
|
|
"accept-encoding": "gzip, deflate, br"
|
|
},
|
|
"url": "https://index.docker.io/v2/paperlessngx/paperless/tags/list?n=10000",
|
|
"hostType": "docker",
|
|
"username": "",
|
|
"password": "",
|
|
"method": "GET",
|
|
"http2": false
|
|
},
|
|
"response": {
|
|
"statusCode": 401,
|
|
"statusMessage": "Unauthorized",
|
|
"body": {
|
|
"errors": [
|
|
{
|
|
"code": "UNAUTHORIZED",
|
|
"message": "authentication required",
|
|
"detail": [
|
|
{
|
|
"Type": "repository",
|
|
"Class": "",
|
|
"Name": "paperlessngx/paperless",
|
|
"Action": "pull"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"headers": {
|
|
"date": "Tue, 07 Apr 2026 19:52:54 GMT",
|
|
"content-type": "application/json",
|
|
"content-length": "165",
|
|
"connection": "keep-alive",
|
|
"docker-distribution-api-version": "registry/2.0",
|
|
"www-authenticate": "Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\",scope=\"repository:paperlessngx/paperless:pull\",error=\"insufficient_scope\"",
|
|
"strict-transport-security": "max-age=31536000"
|
|
},
|
|
"httpVersion": "1.1",
|
|
"retryCount": 0
|
|
}
|
|
}
|
|
INFO: DRY-RUN: Would close Dependency Dashboard (repository=local)
|
|
"title": "Dependency Dashboard"
|
|
ERROR: Repository has unknown error (repository=local)
|
|
"err": {
|
|
"message": "Cannot read properties of undefined (reading 'renovate/reconfigure')",
|
|
"stack": "TypeError: Cannot read properties of undefined (reading 'renovate/reconfigure')\n at getBranchCommit (/Users/vincent.mahnke/.npm/_npx/05eeecd92f4e18e0/node_modules/renovate/lib/util/git/index.ts:504:30)\n at validateReconfigureBranch (/Users/vincent.mahnke/.npm/_npx/05eeecd92f4e18e0/node_modules/renovate/lib/workers/repository/reconfigure/index.ts:61:36)\n at processTicksAndRejections (node:internal/process/task_queues:104:5)\n at finalizeRepo (/Users/vincent.mahnke/.npm/_npx/05eeecd92f4e18e0/node_modules/renovate/lib/workers/repository/finalize/index.ts:20:3)\n at Object.renovateRepository (/Users/vincent.mahnke/.npm/_npx/05eeecd92f4e18e0/node_modules/renovate/lib/workers/repository/index.ts:105:7)\n at attributes.repository (/Users/vincent.mahnke/.npm/_npx/05eeecd92f4e18e0/node_modules/renovate/lib/workers/global/index.ts:218:11)\n at start (/Users/vincent.mahnke/.npm/_npx/05eeecd92f4e18e0/node_modules/renovate/lib/workers/global/index.ts:203:7)\n at /Users/vincent.mahnke/.npm/_npx/05eeecd92f4e18e0/node_modules/renovate/lib/renovate.ts:18:22"
|
|
}
|
|
INFO: Repository finished (repository=local)
|
|
"cloned": undefined,
|
|
"durationMs": 806
|
|
INFO: Renovate was run at log level "info". Set LOG_LEVEL=debug in environment variables to see extended debug logs.
|
|
INFO: Renovate is exiting with a non-zero code due to the following logged errors
|
|
"loggerErrors": [
|
|
{
|
|
"name": "renovate",
|
|
"level": 50,
|
|
"logContext": "zpmkFh2liN0xgt7FoPX1h",
|
|
"repository": "local",
|
|
"err": {
|
|
"message": "Cannot read properties of undefined (reading 'renovate/reconfigure')",
|
|
"stack": "TypeError: Cannot read properties of undefined (reading 'renovate/reconfigure')\n at getBranchCommit (/Users/vincent.mahnke/.npm/_npx/05eeecd92f4e18e0/node_modules/renovate/lib/util/git/index.ts:504:30)\n at validateReconfigureBranch (/Users/vincent.mahnke/.npm/_npx/05eeecd92f4e18e0/node_modules/renovate/lib/workers/repository/reconfigure/index.ts:61:36)\n at processTicksAndRejections (node:internal/process/task_queues:104:5)\n at finalizeRepo (/Users/vincent.mahnke/.npm/_npx/05eeecd92f4e18e0/node_modules/renovate/lib/workers/repository/finalize/index.ts:20:3)\n at Object.renovateRepository (/Users/vincent.mahnke/.npm/_npx/05eeecd92f4e18e0/node_modules/renovate/lib/workers/repository/index.ts:105:7)\n at attributes.repository (/Users/vincent.mahnke/.npm/_npx/05eeecd92f4e18e0/node_modules/renovate/lib/workers/global/index.ts:218:11)\n at start (/Users/vincent.mahnke/.npm/_npx/05eeecd92f4e18e0/node_modules/renovate/lib/workers/global/index.ts:203:7)\n at /Users/vincent.mahnke/.npm/_npx/05eeecd92f4e18e0/node_modules/renovate/lib/renovate.ts:18:22"
|
|
},
|
|
"msg": "Repository has unknown error"
|
|
}
|
|
]
|
|
```
|
|
|
|
Running on GitHub, [Renovate only needs a token to work](https://github.com/ViMaSter/terraform-provider-allinkl/blob/main/.github/workflows/renovate.yml#L21-L27).
|
|
Self-hosting Renovate, please read the [security implications](https://docs.renovatebot.com/security-and-permissions/#security-awareness-for-self-hosted-renovate-instances). |