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

deployment: add multi-arch docker support #268

Closed
deltabweb opened this issue Aug 15, 2019 · 9 comments · Fixed by #1643
Closed

deployment: add multi-arch docker support #268

deltabweb opened this issue Aug 15, 2019 · 9 comments · Fixed by #1643
Assignees
Labels
help wanted Extra attention is needed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@deltabweb
Copy link
Contributor

deltabweb commented Aug 15, 2019

Follow-up of #125
I've been using a workaround until now as I didn't have time to open this issue (+needed to gather more information to make it useful)

Describe the bug
If I try to start the docker container on my arm64 SBC using docker swarm, I get this error:
no suitable node (unsupported platform on 1 node)

To Reproduce

  1. Install portainer on arm64 board
  2. Create a stack with pomerium/pomerium:latest or pomerium/pomerium:arm64v8-latest as one of the services
  3. The service doesn't start and the error message is displayed

I'm almost sure the result will be the same if doing it with docker swarm CLI

Expected behavior

Container starts

Environment

  • Pomerium version (retrieve with pomerium --version):
    v0.2.1

  • Server Operating System/Architecture/Cloud:
    Debian 9 + Docker on Odroid N2

Additional context

I've made some tests with vanilla docker and found out the following:

  1. docker run pomerium/pomerium:latest exits with standard_init_linux.go:211: exec user process caused "exec format error" ==> means that the wrong image was fetched (probably amd64 instead of arm64v8)
  2. docker run pomerium/pomerium:arm64v8-latest exits with {"level":"info","version":"v0.2.1+47f7a44","time":"2019-08-15T06:04:00Z","message":"cmd/pomerium"} {"level":"fatal","error":"authenticate: missing setting: authenticate-service-url","time":"2019-08-15T06:04:00Z","message":"cmd/pomerium: authenticate"} ==> means that vanilla docker (unlike docker swarm) is able to run the image if we force the architecture with the tag

The workaround I am using is simply to create a tag docker tag pomerium/pomerium:arm64v8-latest pomerium:aarch64-latest and then use this tag in my service stack. I reckon this prevents portainer / docker swarm from verifying the architecture of the image because it's a local image.

I've also found this article which talks about multiple architectures with docker and more specifically docker manifest
https://dev.to/toolboc/publish-multi-arch-docker-images-to-a-single-repo-with-docker-manifests-329n
I am thinking that my problem could be coming from the architecture not being set properly in the manifest or something like that - don't take my word for it though as I'm not an expert in this, I'm just a simple docker user :)

@desimone desimone added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. accepted help wanted Extra attention is needed and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Aug 19, 2019
@desimone
Copy link
Contributor

Thanks for following up about this @deltabweb .

I would love to support multiple architectures with docker in line with the link you provided but when I last looked at using the (still experimental?) manifest tool I wan't able to get things working. And I would especially love to have this hook into our existing build process, maybe using something like travis/docker?

Unfortunately, I likely won't have time to work on this in the near term, would this be something you'd be interested in implementing @deltabweb

See also:

@deltabweb
Copy link
Contributor Author

Hi @desimone , thanks for the answer.
Unfortunately, I don't have time to implement it either.

I guess we can just leave this issue open until someone can take care of it? It's a minor problem and probably doesn't affect many users.

@desimone desimone added deployment NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed accepted discuss labels Aug 26, 2019
@desimone desimone changed the title Docker: arm64 image not working properly with docker swarm deployment: add multi-arch / os build support with manifest Aug 26, 2019
@desimone desimone changed the title deployment: add multi-arch / os build support with manifest deployment: add multi-arch docker support Aug 26, 2019
@travisgroth
Copy link
Contributor

Hi @deltabweb

It looks like two different items here:

  1. the arm images have the wrong arch.

  2. we aren't publishing a multi-arch manifest.

(1) is a definite problem and (2) is a nice to have, but I believe it needs the first fixed.

Could you test using the image pomerium/pomerium:arm64v8-test and see if it behaves as expected WRT architecture? This is a manual build, so please don't use beyond testing for the moment.

@travisgroth
Copy link
Contributor

@deltabweb FYI, we've changed the build automation and should start spitting out proper images going forward. There is also now an arm64 master that will keep up with the git master build.

Once we've verified the full release pipeline, we'll move to a multi-arch manifest.

Thanks again for reporting!

@deltabweb
Copy link
Contributor Author

@travisgroth Awesome, thanks for working on that!
Sorry that I haven't had time to test the other image, I'll try to run the latest build as soon as I can and report back.

@desimone
Copy link
Contributor

Closing as multi-arch support is going to be constrained by envoy arch support.

@stuartpb
Copy link

stuartpb commented Oct 11, 2020

Shouldn't this be re-opened? As of 1.16.0 (released October 8), Envoy ships multiarch compatible images.

@desimone desimone reopened this Oct 11, 2020
@desimone
Copy link
Contributor

desimone commented Oct 11, 2020

@stuartpb maybe!

@desimone
Copy link
Contributor

desimone commented Dec 1, 2020

GoReleaser v0.148.0 is out, and with it, the ability to release multi-platform Docker images, a.k.a. Docker Manifests. This should make cross platform builds much easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants