Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"request": "launch",
"program": "dfupdate.py",
"console": "integratedTerminal",
"args": "-d ../cloudenv/Dockerfile -n ../cloudenv/new_ver.json"
"args": "-d ./Dockerfile -n ./new_ver.json"
}
]
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY dfupdate.py /dfupdate.py

COPY docker-entrypoint.sh /docker-entrypoint.sh

ENV DFUPDATE_VERSION 2.1.1
ENV DFUPDATE_VERSION 2.2.1
ENV REQUESTS_VERSION 2.32.5
ENV TENACITY_VERSION 9.1.2
ENV DOCKERFILE_PARSE_VERSION 2.0.1
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,26 @@ include_regex = "\\d+\\.\\d+\\.?\\d?-alpine\\d\\.\\d+"

Note that the entry must be called 'BASE' for dfupate to recognise it. The script will update the Dockerfile directly with any newer base image found.

For multi-stage Dockerfiles, dfupdate will attempt to update every `FROM` line. By default it treats the final stage as `BASE`. Earlier stages are matched using the stage name, stage index, or both:

- If the stage is named (e.g. `FROM node:22-alpine AS builder`), use `BASE_<NAME>` or `<NAME>_BASE`, for example `BASE_BUILDER`.
- All stages can also be addressed by index with `BASE_STAGE_<index>` or `BASE<index>`, where the first `FROM` is index `0`.
- If none of the above are present, the final stage falls back to `BASE`.

Example `nvchecker.toml` for a two-stage build:

```
[BASE_BUILDER]
source = "container"
container = "library/node"
include_regex = "\\d+\\.\\d+-alpine\\d+\\.\\d+"

[BASE]
source = "container"
container = "library/python"
include_regex = "\\d+\\.\\d+\\.?\\d?-alpine\\d\\.\\d+"
```

### Required ENV Variables

You can update included software in your Dockerfile using nvchecker and dfupdate.
Expand Down
Loading