barcus / docker-php-fpm-alpine

Docker image of php-fpm based on alpine
https://hub.docker.com/u/barcus/
ISC License
1 stars 0 forks source link

exec format error when run on arm64 #1

Closed LukasK13 closed 5 months ago

LukasK13 commented 1 year ago

When the container is started on a Raspberry Pi 4 with Ubuntu Server 22.04 64 Bit, the container exits with the error exec /docker-entrypoint.sh: exec format error.

Cloning the repository and building the image using the Dockerfile fixes the issue. Probably the image on Docker Hub is not properly built for arm64.

spinnaker1 commented 7 months ago

@barcus Can you re-build and update the docker hub image please?

yanivp commented 6 months ago

Same thing happens to me on a Raspberry pi 4b arm64

barcus commented 6 months ago

Hello @yanivp @LukasK13 are you running 64b operating system on this device for sure ? I run myself this container on arm64 devices without any trouble !

Can you let me know output of uname -m please ?

barcus commented 6 months ago

I am going to add a build for linux/arm/v7 architecture, in case you use a 32b OS on your device !

yanivp commented 6 months ago

Hello @yanivp @LukasK13 are you running 64b operating system on this device for sure ? I run myself this container on arm64 devices without any trouble !

Can you let me know output of uname -m please ?

Raspberry pi 4b, 8GB ram, Raspberry pi OS 64bit

uname -m outputs aarch64

I just ended up doing the same as @LukasK13 and cloned the repo. Building the container locally worked without issues. I just think it will help other people if the dockerhub repo already came with one available since this issue isn't simple to figure out.

barcus commented 6 months ago

Yes, this is what i'm trying to do @yanivp, unfortunately I don't have access to aarch64 device to test it ! My linux/arm64 device is a MacBook. Can you please try to run docker compose file with platform setup, like this ?

services:
  web:
    platform: linux/arm64
    image: barcus/php-fpm-alpine:latest

Also i'm interested to know about docker info command output please

yanivp commented 6 months ago

@barcus the container logs

web-1  | exec /docker-entrypoint.sh: exec format error

docker info output

Client: Docker Engine - Community
 Version:    26.1.0
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.14.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.26.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 3
  Running: 2
  Paused: 0
  Stopped: 1
 Images: 24
 Server Version: 26.1.0
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: e377cd56a71523140ca6ae87e30244719194a521
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.6.28+rpt-rpi-v8
 Operating System: Debian GNU/Linux 12 (bookworm)
 OSType: linux
 Architecture: aarch64
 CPUs: 4
 Total Memory: 7.627GiB
 Name: REDACTED
 ID: REDACTED
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
barcus commented 5 months ago

It's fixed ! n00b issue, sorry :/

https://github.com/barcus/docker-php-fpm-alpine/commit/9a1deeb0d67ff81d1df973014ca84a508ead0fab