Skip to content

correctly use target-arch#3665

Merged
deitch merged 1 commit intolinuxkit:masterfrom
deitch:alpine-fix-targetauth
May 10, 2021
Merged

correctly use target-arch#3665
deitch merged 1 commit intolinuxkit:masterfrom
deitch:alpine-fix-targetauth

Conversation

@deitch
Copy link
Collaborator

@deitch deitch commented May 10, 2021

Signed-off-by: Avi Deitcher avi@deitcher.net

- What I did

In PR #3650 we moved the logic for calculating the hash for an arch-specific alpine image from inside tools/alpine/Makefile to inside tools/alpine/Dockerfile and then consumed it. This was a good idea, but the implementation had two issues:

  • The actual usage of TARGETARCH did so in a way that left it as a literal ${TARGETARCH} rather than interpolated correctly by the Dockerfile
  • The file was named /etc/alpine-hash, which implied that it was the generic, multi-arch index, when really it is just the arch-specific one

This PR corrects both of the above. It ensures that TARGETARCH is interpolated by the Dockerfile, and it saves the file as /etc/alpine-hash-arch.

This does not resolve the question of having an alpine image carry the multi-arch tag, likely in /etc/alpine-hash, as that is a more complicated issue, and something we never had before (one step up). Instead, it just fixes a regression from #3650 so that this all works correctly.

If I can figure out a sane way to get /etc/alpine-hash before this PR goes in, I will update this PR, else it will be the subject of a separate one (potentially).

- How I did it

Modified tools/alpine/Makefile and tools/alpine./Dockerfile

- How to verify it

CI is your friend. Also, you can do what I did, which is to build linuxkit/alpine manually on different platforms and check the content of /etc/alpine-hash-arch.

- Description for the changelog

Fix alpine hash file generation

Signed-off-by: Avi Deitcher <avi@deitcher.net>
@deitch deitch requested review from dave-tucker and rn May 10, 2021 09:27
Copy link
Member

@dave-tucker dave-tucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@deitch
Copy link
Collaborator Author

deitch commented May 10, 2021

Thanks. Glad to get this regression out of the way.

@deitch deitch merged commit 8dd089a into linuxkit:master May 10, 2021
@deitch deitch deleted the alpine-fix-targetauth branch May 10, 2021 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments