Skip to content
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

Docker: remove default #468

Closed
wants to merge 1 commit into from
Closed

Docker: remove default #468

wants to merge 1 commit into from

Conversation

DeviaVir
Copy link
Contributor

I noticed that the ARM build was using amd64 as folder, this was fixed after removing the default value here.

@jgriffiths
Copy link
Contributor

jgriffiths commented Nov 26, 2024

Hi @DeviaVir

I'm building arm64 here with:

DOCKER_BUILDKIT=1 docker build . -t greenaddress/wallycore -f Dockerfile_bullseye --platform linux/arm64 --build-arg TARGETARCH=arm64

And skipping --platform and --build-arg for amd64 (which I consider the default build).

My understanding is that you need to pass in or default TARGETARCH otherwise e.g. JAVA_HOME will not be set to the correct directory in the resulting image. I'd prefer not to have to force anyone building the default image to change their build command.

Can you confirm the above command (or its buildx variant) works for you? If so I will document the arm64 instructions in the dockerfile and leave the default there.

edit: documented in this WIP PR: #469

@DeviaVir
Copy link
Contributor Author

Hi @DeviaVir

I'm building arm64 here with:

DOCKER_BUILDKIT=1 docker build . -t greenaddress/wallycore -f Dockerfile_bullseye --platform linux/arm64 --build-arg TARGETARCH=arm64

And skipping --platform and --build-arg for amd64 (which I consider the default build).

My understanding is that you need to pass in or default TARGETARCH otherwise e.g. JAVA_HOME will not be set to the correct directory in the resulting image. I'd prefer not to have to force anyone building the default image to change their build command.

Can you confirm the above command (or its buildx variant) works for you? If so I will document the arm64 instructions in the dockerfile and leave the default there.

edit: documented in this WIP PR: #469

I think you're misunderstanding how this is supposed to work, the idea is that you create a single build for both, so you never have to pass the TARGETARCH, docker does that for you.

This way, whichever architecture you're on, you can pull the same images.

@jgriffiths
Copy link
Contributor

so you never have to pass the TARGETARCH, docker does that for you.

I think this is only true for buildx, not build?

The former has now replaced the latter in current docker releases, but isn't available on bullseye.

@DeviaVir DeviaVir closed this Nov 27, 2024
@jgriffiths
Copy link
Contributor

Merged a bookworm image which handles multi-arch, while leaving bullseye as defaulting to amd64.

@jgriffiths jgriffiths deleted the arm-patch branch November 29, 2024 18:08
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