forked from alt/image-forge
Add exclude_regexes to distoless.toml format
This commit is contained in:
parent
a9e8c9fc1d
commit
3dd93ea596
15
build.py
15
build.py
@ -71,6 +71,7 @@ class Distroless:
|
|||||||
self.file_lists = dd.get("file-lists", [])
|
self.file_lists = dd.get("file-lists", [])
|
||||||
self.files = dd.get("files", [])
|
self.files = dd.get("files", [])
|
||||||
self.packages = dd.get("packages", [])
|
self.packages = dd.get("packages", [])
|
||||||
|
self.exclude_regexes = dd.get("exclude-regexes", [])
|
||||||
|
|
||||||
self.builder_install_packages = dd.get("builder-install-packages")
|
self.builder_install_packages = dd.get("builder-install-packages")
|
||||||
|
|
||||||
@ -354,7 +355,19 @@ class DockerBuilder:
|
|||||||
+ packages_options
|
+ packages_options
|
||||||
)
|
)
|
||||||
|
|
||||||
run(["buildah", "run", builder, "./distroless-builder.py", "tar"])
|
exclude_regexes_options = []
|
||||||
|
if distroless.exclude_regexes:
|
||||||
|
exclude_regexes_options = ["-r"] + distroless.exclude_regexes
|
||||||
|
run(
|
||||||
|
[
|
||||||
|
"buildah",
|
||||||
|
"run",
|
||||||
|
builder,
|
||||||
|
"./distroless-builder.py",
|
||||||
|
"tar",
|
||||||
|
]
|
||||||
|
+ exclude_regexes_options
|
||||||
|
)
|
||||||
|
|
||||||
run(
|
run(
|
||||||
[
|
[
|
||||||
|
Loading…
Reference in New Issue
Block a user