Slim(toolkit): Don't change anything in your container image and minify it by up to 30x (and for compiled languages even more) making it secure too! (free and open source)
Apache License 2.0
19.45k
stars
730
forks
source link
Use env vars passed via overrides in output image #395
Passing --env FOO=BAR with --image-overrides=all || --image-overrides=env when invoking docker slim's build command, should result in the output image having an environmental variable FOO=BAR.
Extend documentation for flags that can be modified via --image-overrides to better reflect the difference between flags targeting runtime versus generated images.
Why
Propagate env var changes to output images.
How Tested
Build arbitrary image with an env var FOO=bar. Could instantiate this in your image's Dockerfile.
Run docker slim build against this image with the following two flags--env FOO=notbar--image-overrides=env
👇 Click on the image for a new way to code review
- Make big changes easier — review code in small groups of related files
- Know where to start — see the whole change at a glance
- Take a code tour — explore the change with an interactive tour
- Make comments and review — all fully sync’ed with github
[Try it now!](https://app.codesee.io/r/reviews?pr=395&src=https%3A%2F%2Fgithub.com%2Fdocker-slim%2Fdocker-slim)
Fixes-###
What
--env FOO=BAR
with--image-overrides=all
||--image-overrides=env
when invoking docker slim'sbuild
command, should result in the output image having an environmental variable FOO=BAR.--image-overrides
to better reflect the difference between flags targeting runtime versus generated images.Why
How Tested
--env FOO=notbar
--image-overrides=env