containous / traefik-library-image

ARCHIVED
https://github.com/traefik/traefik-library-image
Apache License 2.0
218 stars 60 forks source link

standard_init_linux.go:211: exec user process caused "exec format error" with 1.7.14 arm64 builds #57

Closed EugenMayer closed 5 years ago

EugenMayer commented 5 years ago

I am building a wrapper image arround the official traefik release. While the amd64 build works as usual ( and has been working for months, same as the arm builds ) with 1.7.14 the arm build is failing:

docker build -t eugenmayer/traefik:arm64 . -f Dockerfile_arm64

Sending build context to Docker daemon  167.4kB
Step 1/10 : FROM arm64v8/traefik:1.7-alpine
 ---> 0d3f272be5ec
Step 2/10 : MAINTAINER Eugen Mayer <eugen.mayer@kontextwork.de>
 ---> Using cache
 ---> 324742637052
Step 3/10 : ADD bin/ /usr/local/bin/
 ---> Using cache
 ---> 3c7c9f1ed01b
Step 4/10 : ADD configuration-entrypoint.sh /configuration-entrypoint.sh
 ---> Using cache
 ---> 706c9d9872c6
Step 5/10 : RUN mkdir -p /etc/traefik /mnt/acme /mnt/filestorage /mnt/certs /usr/local/bin /etc/tiller  && apk --update add bash ruby openssl  && chmod +x /usr/local/bin/*.sh /configuration-entrypoint.sh  && gem install tiller json_pure --no-ri
 ---> Running in 346b74d091c1
standard_init_linux.go:211: exec user process caused "exec format error"
The command '/bin/sh -c mkdir -p /etc/traefik /mnt/acme /mnt/filestorage /mnt/certs /usr/local/bin /etc/tiller  && apk --update add bash ruby openssl  && chmod +x /usr/local/bin/*.sh /configuration-entrypoint.sh  && gem install tiller json_pure --no-ri' returned a non-zero code: 1

https://github.com/EugenMayer/docker-image-traefik/blob/master/Dockerfile_arm64

What has been changed from 1.7.13 to 1.7.14 concerning the image itself? i have seen that go has been upgraded, but that should not break the gem installation of a ruby gem i would say.

The same gem installs just find in the amd64 build with 1.7.14

https://github.com/EugenMayer/docker-image-traefik/blob/master/Dockerfile

Thanks!

dduportal commented 5 years ago

Hi @EugenMayer, would you mind opening a topic in the community forum at for such subject, unless it's confirmed that it's an issue? We want to use issue tracker for tracking confirmed bug and new feature requests.

Btw, I tested your repo on Docker4Mac and it builds without any issues:

docker build -t eugenmayer/traefik:arm64 . -f Dockerfile_arm64
Sending build context to Docker daemon  155.6kB
Step 1/10 : FROM arm64v8/traefik:1.7-alpine
1.7-alpine: Pulling from arm64v8/traefik
0362ad1dd800: Pull complete 
aec749d99dfc: Pull complete 
3eb06d651e28: Pull complete 
194ee2421500: Pull complete 
Digest: sha256:7d1fe684709856928fcb4a26572b6911f7a16ef086020c15ce43f7b0bc6b0b17
Status: Downloaded newer image for arm64v8/traefik:1.7-alpine
 ---> 0d3f272be5ec
Step 2/10 : MAINTAINER Eugen Mayer <eugen.mayer@kontextwork.de>
 ---> Running in 3ffb5e810634
Removing intermediate container 3ffb5e810634
 ---> 44b89f129f06
Step 3/10 : ADD bin/ /usr/local/bin/
 ---> 739beceef5a5
Step 4/10 : ADD configuration-entrypoint.sh /configuration-entrypoint.sh
 ---> 160608e79029
Step 5/10 : RUN mkdir -p /etc/traefik /mnt/acme /mnt/filestorage /mnt/certs /usr/local/bin /etc/tiller  && apk --update add bash ruby openssl  && chmod +x /usr/local/bin/*.sh /configuration-entrypoint.sh  && gem install tiller json_pure --no-ri
 ---> Running in a1a868328cbe
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/aarch64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/aarch64/APKINDEX.tar.gz
(1/10) Installing ncurses-terminfo-base (6.1_p20190105-r0)
(2/10) Installing ncurses-terminfo (6.1_p20190105-r0)
(3/10) Installing ncurses-libs (6.1_p20190105-r0)
(4/10) Installing readline (7.0.003-r1)
(5/10) Installing bash (4.4.19-r1)
Executing bash-4.4.19-r1.post-install
(6/10) Installing openssl (1.1.1b-r1)
(7/10) Installing gmp (6.1.2-r1)
(8/10) Installing yaml (0.2.1-r0)
(9/10) Installing ruby-libs (2.5.5-r0)
(10/10) Installing ruby (2.5.5-r0)
Executing busybox-1.29.3-r10.trigger
OK: 32 MiB in 26 packages
Successfully installed tiller-1.5.0
Successfully installed json_pure-2.2.0
2 gems installed
Removing intermediate container a1a868328cbe
 ---> ac7cef312533
Step 6/10 : ADD tiller/ /etc/tiller/
 ---> 27147a2e5df9
Step 7/10 : VOLUME /mnt/certs
 ---> Running in 8c29d698084f
Removing intermediate container 8c29d698084f
 ---> 8eb9b685db4a
Step 8/10 : VOLUME /mnt/filestorage
 ---> Running in e01b7ca3ddd8
Removing intermediate container e01b7ca3ddd8
 ---> 78a3bdb9c410
Step 9/10 : VOLUME /mnt/acme
 ---> Running in eeb57be3075a
Removing intermediate container eeb57be3075a
 ---> 0c7fc4da56d0
Step 10/10 : ENTRYPOINT ["/configuration-entrypoint.sh"]
 ---> Running in 667b29f424f6
Removing intermediate container 667b29f424f6
 ---> 5bf37c7be43b
Successfully built 5bf37c7be43b
Successfully tagged eugenmayer/traefik:arm64
$ docker run --rm -t arm64v8/traefik:1.7-alpine version
Version:      v1.7.14
Codename:     maroilles
Go version:   go1.12.8
Built:        2019-08-14_09:46:58AM
OS/Arch:      linux/arm64

Are you sure the Docker Engine used by your Docker client has the Quem library for ARM supports? It looks like that the shell of the image, when called by the RUN instruction, is throwing the exec error meaning the default ash for ARM/alpine is not able to be executed by the kernel behind your Docker Engine.

dduportal commented 5 years ago

I'm closing the issue for triage reasons. Feel free to reopen it if we can confirm a bug on the community forum. Thanks a lot for your interest in the project!