Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

release images are not reproducible #382

Closed
mythi opened this issue Aug 8, 2019 · 1 comment · Fixed by #385
Closed

release images are not reproducible #382

mythi opened this issue Aug 8, 2019 · 1 comment · Fixed by #385
Assignees

Comments

@mythi
Copy link

mythi commented Aug 8, 2019

We have related issues #378 and #379 but I think this deserves it's own issue.

While working on QAT image reproducible builds I discovered a problem with ${SWUPD_UPDATE_ARG}: The value is reset before it's used. The documentation confirms this:

An ARG instruction goes out of scope at the end of the build stage where it was defined. To use an arg in multiple stages, each stage must include the ARG instruction.

This means swupd update never gets to use the locked version:

Step 8/42 : RUN echo "version ${SWUPD_UPDATE_ARG}" && swupd update ${SWUPD_UPDATE_ARG} && swupd bundle-add ${NDCTL_BUILD_DEPS} go-basic-dev && rm -rf /var/lib/swupd
 ---> Running in 385297cac894
version
Update started.
Preparing to update from 30650 to 30700
Downloading packs for:
@avalluri
Copy link
Contributor

avalluri commented Aug 8, 2019

Thanks, @mythi for finding this, So redefining ARG SWUPD_UPDATE_ARG in each build stage should fix the problem right? I found an interesting discussion related to this: moby/moby#34129

@avalluri avalluri self-assigned this Aug 8, 2019
avalluri added a commit to avalluri/pmem-CSI that referenced this issue Aug 13, 2019
An ARG instruction goes out of scope at the end of the build stage where it was
defined. To use an arg in multiple stages, each stage must include the ARG
instruction.

Refer to:
https://github.com/docker/cli/blob/master/docs/reference/builder.md#understand-how-arg-and-from-interact

FIXES: intel#382
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants