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

ARM64 Devcontainer #14

Open
londospark opened this issue Sep 19, 2022 · 5 comments
Open

ARM64 Devcontainer #14

londospark opened this issue Sep 19, 2022 · 5 comments

Comments

@londospark
Copy link
Contributor

For people who use M1/M2 macs and other ARM64-based devices could we please get an ARM64-native docker image for https://hub.docker.com/r/purtontech/rust-on-nails-devcontainer/?

@9876691
Copy link
Contributor

9876691 commented Nov 17, 2022

@londospark That's a great idea. If you know how to do it let me know, otherwise I'll do some research.

@londospark
Copy link
Contributor Author

Thank you - I don't know how to do it off hand but I suspect that someone would need to have access to the original Dockerfile to update the image and add an arm64 version

@hjr3
Copy link
Contributor

hjr3 commented Mar 11, 2023

We should be able to do this using docker buildx for multi-platform builds.

Example:

$ cd /path/to/rust-on-nails
$ docker buildx build --platform linux/arm64 nails-devcontainer
 ...
 => => writing image sha256:5c9c95cb837f7e6d2c447dbe5a614e8726ba6ee336f49416f840c3431bba27b9
$ docker image inspect --format "{{.Architecture}}" 5c9c95cb837f7e6d2c447dbe5a614e8726ba6ee336f49416f840c3431bba27b9
arm64

See https://docs.docker.com/build/building/multi-platform/ for more information.

I also opened #27 to resolve one issue I ran into when building an arm64 target.

I created a personal image in the meantime: https://hub.docker.com/layers/hjr3/rust-on-nails-devcontainer/db5471a/images/sha256-ed9f94c06d7dffe0865e5d7f44cfe1d0ef870ec0c6fa17498b27406650957de0?context=repo

@9876691
Copy link
Contributor

9876691 commented Mar 12, 2023

I tried

docker buildx build --platform linux/arm64 dev-env-as-code

And it locked up while trying to build the cornucopia and cargo-chef. I'll ask these guys if they will build binaries as it makes sense that they get built upstream.

Then we'll need to be aware of packages that get downloaded should use these var to get the correct version.

TARGETOS : Target platform operating system. e.g. linux
TARGETARCH: Target platform CPU architecture. e.g. arm64
TARGETVARIANT : Target platform CPU architecture Variant. e.g. v8

@gerwitz
Copy link

gerwitz commented Dec 22, 2024

purtontech/rust-on-nails-devcontainer/ seems to have started including arm64 builds last month, perhaps this issue can be closed?

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

No branches or pull requests

4 participants