Multi-architecture Docker image #206

Closed
opened 2026-01-19 18:29:25 +00:00 by michael · 5 comments
Owner

Originally created by @gabriel-duque on GitHub.

Hello,

I have been using the transfer.sh Docker image for quite some time now.

I would like to use it on arm64 but the image you publish is only amd64.

I might be wrong about this but from what I saw, supporting other architectures should be pretty straightforward and easy using buildx as you don't rely on other images than the golang one and that one is already multi-architecture.

Normally, you shouldn't even have to touch the source code or Dockerfile, just instruct Docker to build a multi-platform image and every thing else should be the same.

Originally created by @gabriel-duque on GitHub. Hello, I have been using the `transfer.sh` Docker image for quite some time now. I would like to use it on arm64 but the image you publish is only amd64. I might be wrong about this but from what I saw, supporting other architectures should be pretty straightforward and easy using [`buildx`](https://docs.docker.com/buildx/working-with-buildx/) as you don't rely on other images than the `golang` one and that one is already multi-architecture. Normally, you shouldn't even have to touch the source code or Dockerfile, just instruct Docker to build a multi-platform image and every thing else should be the same.
Author
Owner

@gabriel-duque commented on GitHub:

@aspacca I just created a PR to add a workflow to build the images.

The currrent build is going to fail at the push step because of the missing secrets, but the images will build (hopefully) just fine.

@gabriel-duque commented on GitHub: @aspacca I just created a PR to add a workflow to build the images. The currrent build is going to fail at the push step because of the missing secrets, but the images will build (hopefully) just fine.
Author
Owner

@gabriel-duque commented on GitHub:

I just tried your image dutchoders/transfer.sh:ISSUE-313-aarch64 with sha256 = b8bab5.... and I am getting an exec format error so something went wrong and it isn't the right architecture 😢

I just built images for armv7, armv8(aarch64), amd64 and i386 and they seem to be working.

I only tested the aarch64 one but I can upload a file and get it back and the logs seem happy.

I put them here.

I didn't try armv6, ppc64le or s390x because I have already had problems when compiling static go binaries with them in the past (especially ones using the net module).

In order to produce them I simply did this (my buildx is already configured but it is the default config):

git clone https://github.com/dutchcoders/transfer.sh
cd transfer.sh
docker buildx build --platform linux/amd64,linux/386,linux/arm64,linux/arm/v7 -t zuh0/transfer.sh:latest --push .

EDIT: I just tested armv6, ppc64le and s390x and none of them build.

Other than that, I tested i386 and armv7 and they seem to work well (could upload then download a file on local storage).

@gabriel-duque commented on GitHub: I just tried your image [`dutchoders/transfer.sh:ISSUE-313-aarch64`](https://hub.docker.com/layers/dutchcoders/transfer.sh/ISSUE-313-aarch64/images/sha256-b8bab57235b95ee198127120bc849e99369952ee5124405f2a37639a7a7dca05?context=explore) with sha256 = b8bab5.... and I am getting an exec format error so something went wrong and it isn't the right architecture :cry: I just built images for armv7, armv8(aarch64), amd64 and i386 and they seem to be working. I only tested the aarch64 one but I can upload a file and get it back and the logs seem happy. I put them [here](https://hub.docker.com/r/zuh0/transfer.sh/tags). I didn't try armv6, ppc64le or s390x because I have already had problems when compiling static go binaries with them in the past (especially ones using the `net` module). In order to produce them I simply did this (my `buildx` is already configured but it is the default config): ```shell git clone https://github.com/dutchcoders/transfer.sh cd transfer.sh docker buildx build --platform linux/amd64,linux/386,linux/arm64,linux/arm/v7 -t zuh0/transfer.sh:latest --push . ``` EDIT: I just tested armv6, ppc64le and s390x and none of them build. Other than that, I tested i386 and armv7 and they seem to work well (could upload then download a file on local storage).
Author
Owner

@paolafrancesca commented on GitHub:

hi @zuh0 docker hub doesn't provide an automatic way to build for multiple architectures
I've used https://github.com/rmoriz/multiarch-test process to achieve (probably qemu not needed since go can cross compile)

can you test the images built?
https://hub.docker.com/layers/dutchcoders/transfer.sh/ISSUE-313/images/sha256-f114f3dbaa1b3b7a1fc7816acfdfaeba6a0585d75e1b9798219171f7730abb50?context=repo

@paolafrancesca commented on GitHub: hi @zuh0 docker hub doesn't provide an automatic way to build for multiple architectures I've used https://github.com/rmoriz/multiarch-test process to achieve (probably qemu not needed since go can cross compile) can you test the images built? https://hub.docker.com/layers/dutchcoders/transfer.sh/ISSUE-313/images/sha256-f114f3dbaa1b3b7a1fc7816acfdfaeba6a0585d75e1b9798219171f7730abb50?context=repo
Author
Owner

@paolafrancesca commented on GitHub:

@zuh0 thanks

see https://github.com/dutchcoders/transfer.sh/pull/316 for using the buildx github action
anyway I cannot yet push to docker hub since I need access to project settings from the original maintainer. I've just sent him an email

@paolafrancesca commented on GitHub: @zuh0 thanks see https://github.com/dutchcoders/transfer.sh/pull/316 for using the buildx github action anyway I cannot yet push to docker hub since I need access to project settings from the original maintainer. I've just sent him an email
Author
Owner

@gabriel-duque commented on GitHub:

hey @aspacca ,
thanks for the answer !

I will try this image and tell you if it works well. since that is what I use, I can only test the local storage driver using the arm64 architecture for now but that can already be a nice test.

the moritz/multiarch-test repo looks nice !

just for the record: I have a setup to automatically build multi-artchitecture docker images in a GithubAction in one of my personal repos and the setup was a breeze using this action.

this might be the option implying the least efforts/changes.

@gabriel-duque commented on GitHub: hey @aspacca , thanks for the answer ! I will try this image and tell you if it works well. since that is what I use, I can only test the local storage driver using the arm64 architecture for now but that can already be a nice test. the `moritz/multiarch-test` repo looks nice ! just for the record: I have a setup to automatically build multi-artchitecture docker images in a GithubAction in one of my personal repos and the setup was a breeze using [this](https://github.com/marketplace/actions/docker-buildx) action. this might be the option implying the least efforts/changes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#206