Update Dockerfile for grub2disk:#147
Open
jacobweinstock wants to merge 1 commit intotinkerbell:mainfrom
Open
Conversation
The needed packages werent installed in the final image properly. Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
displague
approved these changes
Sep 8, 2024
Member
|
lgtm, I was hesitant about the Docker multiple arch FROM approach, not sure that it was valid, but it is suggested here: https://stackoverflow.com/a/77726353 https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/ is a good source for alternate approaches, many examples looking just like this one. |
Comment on lines
+13
to
+17
| FROM base AS build-amd64 | ||
| RUN apk add --no-cache grub grub-bios git ca-certificates gcc musl-dev | ||
|
|
||
| FROM base AS build-arm64 | ||
| RUN apk add --no-cache grub git ca-certificates gcc musl-dev |
There was a problem hiding this comment.
I ran into this same issue when trying to fix an EFI grub installation issue for Ubuntu 22.04. Adding a suggestion here, as feedback given in the PR conversation as possible path forward.
Suggested change
| FROM base AS build-amd64 | |
| RUN apk add --no-cache grub grub-bios git ca-certificates gcc musl-dev | |
| FROM base AS build-arm64 | |
| RUN apk add --no-cache grub git ca-certificates gcc musl-dev | |
| FROM base AS build-${TARGETARCH} | |
| RUN apk add --no-cache grub git ca-certificates gcc musl-dev && \ | |
| if [ $TARGETARCH = "amd64" ]; then \ | |
| apk add --no-cache grub-bios \ | |
| ; fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The needed packages werent installed in the final image properly.
Why is this needed
Fixes: #
How Has This Been Tested?
How are existing users impacted? What migration steps/scripts do we need?
Checklist:
I have: