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

multi-platform image builds #92

Open
lizzthabet opened this issue Nov 28, 2022 · 0 comments
Open

multi-platform image builds #92

lizzthabet opened this issue Nov 28, 2022 · 0 comments

Comments

@lizzthabet
Copy link

hi @cmehay! have you thought about supporting multi-platform builds of tor-hidden-service?

i've been experimenting with multi-platform images since i'm running a containerized onion service from a raspberry pi.

i was able to build and push a multi-platform image by following the buildx docs to create a new builder using the docker-container driver. this is what that looks like in practice as another makefile task:

publish-multiplatform:
  docker buildx build --platform linux/amd64,linux/arm64 --build-arg tor_version=$(TOR_VERSION) --build-arg torsocks_version=$(TORSOCKS_VERSION) -f Dockerfile --tag lizz0thabet/tor-hidden-service:$(CUR_TAG) --tag lizz0thabet/tor-hidden-service:latest --push .

and here's the image on hub that i'm using on my pi.

there are a couple ways this ^ particular approach might introduce inconsistencies / friction into the existing workflow. right now, docker compose doesn't support multi-platform builds, so the compose file has to be translated into a docker build command. the second thing is that at the moment buildkit only supports multi-platform manifests when pushing images, so you have to build and push in the same step.

these may be acceptable compromises / changes to the existing workflows, or they may not be! i appreciate the work you've put in to build, maintain, and document tor-hidden-service.

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

1 participant