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

Considering adding support for multi-arch builds (or render dockerfile) #400

Closed
clarkezone opened this issue Mar 27, 2023 · 2 comments
Closed

Comments

@clarkezone
Copy link

it’s pretty trivial to generate multi-arch images with manifest using docker/podman. I don’t believe this is possible via dotnet publish currently not is there any way to get the created dockerfile out in order to run a multi-arch build against. that This means you currently fall off a cliff if you want the more advanced scenario and have to rebuild a dockerfile from scratch. Please consider supporting multiple —arch flags and doing the small extra work under the covers to generate multi arch and a manifest. Or, a flag to write out the dockerfile that is created under the coveres.:

podman build --arch=amd64 --build-arg BUILD_HEADTAG="${HEAD_TAG}" --build-arg BUILD_HASH="${VERSION_HASH}" --build-arg BUILD_BRANCH="${HEAD_BRANCH}" -t ${IMG}:${VERSION}.amd64 -f Dockerfile
	podman build --arch=arm64 --build-arg BUILD_VERSION="${HEAD_TAG}" --build-arg BUILD_HASH="${VERSION_HASH}" --build-arg BUILD_BRANCH="${HEAD_BRANCH}" -t ${IMG}:${VERSION}.arm64 -f Dockerfile

podman manifest create ${IMG}:${VERSION}
podman manifest add ${IMG}:${VERSION} containers-storage:localhost/${IMG}:${VERSION}.amd64
podman manifest add ${IMG}:${VERSION} containers-storage:localhost/${IMG}:${VERSION}.arm64
@baronfel
Copy link
Member

Hey @clarkezone do the discussions in #87 and #146 align with what you'd expect out of these use cases? Multi-manifest publishing is definitely the next 'Big Rock' feature for this tech - there are some hurdles in .NET all-up that we have to look at (we don't support multitargeted publish at all, which this really mirrors IMO) but it is something we should do.

With a multi-manifest container, would you expect the different architectures to be even have different tagging schemes that contain the os/arch. I'm thinking of the MS-built packages here:

image

Note here that the 7.0-jammy tag is a manifest list, and there are three architecture-specific images that have different tags.

@clarkezone
Copy link
Author

@baronfel yes those both capture it pretty much exactly. #146 looks like it would unblock me in the short term, i'll give that a try. Subscribed to both of this, will close this one.

@clarkezone clarkezone closed this as not planned Won't fix, can't repro, duplicate, stale Apr 5, 2023
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

2 participants