-
Notifications
You must be signed in to change notification settings - Fork 15
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
Use ARG instead of ENV for temporary variables #15
Conversation
Thanks for digging into this, @travier If |
I've opened https://src.fedoraproject.org/container/fedora-toolbox/pull-request/4. I'm reasonably confident that this is the right change but I still need someone with more Fedora infra experience to confirm it. |
@travier have you tried a scratch build? IIRC, these are used by atomic-reactor during the build so it would be good to double check that builds are still successful after this change. |
Hum ok, from a quick look at atomic-reactor it in fact using the LABELS (https://github.com/containerbuildsystem/atomic-reactor/blob/master/atomic_reactor/plugins/bump_release.py#L263) and not the ENV variables so I think this should work 👍 |
How do I trigger a scratch build? I tried:
|
Looks like it's looking at LABELS only: https://github.com/containerbuildsystem/atomic-reactor/blob/master/atomic_reactor/plugins/bump_release.py#L310 |
We only need those temporary variables for the container build and for the LABELS. We do not want to set those specific environment variables for the container environment itself. Using ARG instead of ENV lets us do that. The ARG directive only support one value per line thus psplit the definition into multiple ones. See: containers/toolbox#188 See: https://docs.docker.com/engine/reference/builder/#arg Signed-off-by: Timothée Ravier <tim@siosm.fr>
I pulled in the same change to the upstream Toolbx Git repository: |
Ok merging this, thanks for fixing this. |
We only need those temporary variables for the container build and for the LABELS. We do not want to set those specific environment variables for the container environment itself.
Using ARG instead of ENV lets us do that.
See: containers/toolbox#188
Signed-off-by: Timothée Ravier tim@siosm.fr