Open danstoner opened 3 months ago
I'm currently facing the same problem. I'm using the image as a runtime container for a GitHub Workflow.
Do you know the issue? @dimitri
There is only one docker image for v1.7 with OS/ARCH pair of linux/arm64/v8
.
In earlier releases, we had only linux/amd64
, and it changed in the last release for some reason.
Is there anything we should be doing about that issue then?
Yes, in my opinion, the container registry at dimitri/pgcopydb
should host images for both platforms (linux/amd64
, linux/arm64/v8
).
We do not have automated builds on dockerhub, and my attempts to build for linux/amd64 from my current laptop are failing, all I seem to be able to get is an image for linux/arm64. Help?
Oh I see. So the issue would be resolved if we add automated image build and push to Docker Hub here https://github.com/dimitri/pgcopydb/blob/main/.github/workflows/docker-publish.yml ? As far as I see it's only configured to push to GitHub Container Registry, at the moment.
As a workaround I was able to get an amd64
image using docker pull --platform linux/amd64 ghcr.io/dimitri/pgcopydb:latest
but I also usually pull from docker hub, so had to also change my docker scripts for the image name and tag.
@dimitri
From a Medium article:
The Docker documentation describes how this can be accomplished https://docs.docker.com/engine/reference/builder/#from using the --platform argument with the FROM command.
This will tell Docker to specifically build for linux/amd64 when it is generating the image and now your image that is being built on MacOS will be compatible and deployable to ECS/EKS.
So, for example, in Dockerfile.debian I think changing the first line:
FROM debian:sid
to:
FROM --platform=linux/amd64 debian:sid
might build the non-ARM version.
You mentioned:
my attempts to build for linux/amd64 from my current laptop are failing
Can you elaborate?
I'm pretty sure what is missing here is just the GitHub Workflow, which pushes the image to both GHCR and DockerHub.
If you can not find anyone, I could also contribute this feature.
I get "exec format error" when trying to run the latest docker image.
This works fine with previous versions (v0.16, v0.15, ...).
Docker is supposed to handle all that platform stuff automatically. By using
docker inspect
I see that the image getting pulled was built for 'arm64' even though I am running this command on Intel hardware. My docker is apparently so old I don't have thepull --platform
option ormanifest
options.So, moved on to an Intel MacBook with newer docker installed, I can see the following:
So I think something is wrong in the docker repo where it is always serving the
arm64
image.