Gitea via docker error on docker run "exec format error"


#1
error on docker run,"standard_init_linux.go:190: exec user process caused "exec format error""
os info:
root@R1:/home/rock64# uname -a
Linux R1 4.4.77-rockchip-ayufan-136 #1 SMP Thu Oct 12 09:14:48 UTC 2017 aarch64 aarch64 aarch64 GNU/Linux
root@R1:/home/rock64# cat /proc/version
Linux version 4.4.77-rockchip-ayufan-136 (root@713b8312374e) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #1 SMP Thu Oct 12 09:14:48 UTC 2017
root@R1:/home/rock64# cat /etc/issue
Ubuntu 16.04.3 LTS \n \l
root@R1:/home/rock64# file /bin/ls
/bin/ls: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=2ddaf2fd4461aedced3da6b946139afc66738025, stripped
docker inspect  :
[
    {
        "Id": "d80bfc92182e1e440a250e9b688bb0929d98a89361b01c47903f5fef2f369b14",
        "Created": "2018-04-19T06:33:48.173018653Z",
        "Path": "/usr/bin/entrypoint",
        "Args": [
            "/bin/s6-svscan",
            "/etc/s6"
        ],
        "State": {
            "Status": "exited",
            "Running": false,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 1,
            "Error": "",
            "StartedAt": "2018-04-19T06:33:49.473608751Z",
            "FinishedAt": "2018-04-19T06:33:49.420756983Z"
        },
        "Image": "sha256:6f387e25fa9924e6c20206c259c093f011f3162a98e75fb12a5fa0a68d2fbb31",
        "ResolvConfPath": "/var/lib/docker/containers/d80bfc92182e1e440a250e9b688bb0929d98a89361b01c47903f5fef2f369b14/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/d80bfc92182e1e440a250e9b688bb0929d98a89361b01c47903f5fef2f369b14/hostname",
        "HostsPath": "/var/lib/docker/containers/d80bfc92182e1e440a250e9b688bb0929d98a89361b01c47903f5fef2f369b14/hosts",
        "LogPath": "/var/lib/docker/containers/d80bfc92182e1e440a250e9b688bb0929d98a89361b01c47903f5fef2f369b14/d80bfc92182e1e440a250e9b688bb0929d98a89361b01c47903f5fef2f369b14-json.log",
        "Name": "/gitea",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/Volumes/docker_store/gitea:/data"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "default",
            "PortBindings": {
                "22/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "10022"
                    }
                ],
                "3000/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "10080"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": null,
            "CapDrop": null,
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "shareable",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DiskQuota": 0,
            "KernelMemory": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": 0,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/f137cd0c558e0527bdd12339095a20e56a376576e89565a89a8ffde5a0eb583e-init/diff:/var/lib/docker/overlay2/8743538afd0dbcec0b5fa08480aa88bfef1d855c78442ff131a0f220e1a78b60/diff:/var/lib/docker/overlay2/7080107ea2d3ce1751b93caaa96cbdeb41963e90b7993687185c4e47e773bab0/diff:/var/lib/docker/overlay2/4f840682b86518396e76a84e337d7b73b6cd5225a4c7a6b1d4ce1a1c117549f0/diff:/var/lib/docker/overlay2/6dce4b4fb851ca50c3f2c126c4afe801027c53ba6362a23aadc300356f7c957e/diff:/var/lib/docker/overlay2/3452ad4af6afc0e0cb4f12375fa434dd029f1b16ba313b6625f55743d2c7f72a/diff",
                "MergedDir": "/var/lib/docker/overlay2/f137cd0c558e0527bdd12339095a20e56a376576e89565a89a8ffde5a0eb583e/merged",
                "UpperDir": "/var/lib/docker/overlay2/f137cd0c558e0527bdd12339095a20e56a376576e89565a89a8ffde5a0eb583e/diff",
                "WorkDir": "/var/lib/docker/overlay2/f137cd0c558e0527bdd12339095a20e56a376576e89565a89a8ffde5a0eb583e/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/Volumes/docker_store/gitea",
                "Destination": "/data",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "d80bfc92182e",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "22/tcp": {},
                "3000/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "USER=git",
                "GITEA_CUSTOM=/data/gitea"
            ],
            "Cmd": [
                "/bin/s6-svscan",
                "/etc/s6"
            ],
            "ArgsEscaped": true,
            "Image": "gitea/gitea:latest",
            "Volumes": {
                "/data": {}
            },
            "WorkingDir": "",
            "Entrypoint": [
                "/usr/bin/entrypoint"
            ],
            "OnBuild": null,
            "Labels": {
                "maintainer": "maintainers@gitea.io",
                "org.label-schema.build-date": "2018-04-19T01:47:42Z",
                "org.label-schema.vcs-ref": "f86af9c280a9cacb49d136a0e8d977cf60125a98",
                "org.label-schema.vcs-url": "https://github.com/go-gitea/gitea.git"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "98657c6f26eb75bc73849198a6d3977947dffd9806e439d1a5f6ccd17a35f1dc",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {},
            "SandboxKey": "/var/run/docker/netns/98657c6f26eb",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "6c824875851b9d68d7bec58c42f038d605daae03b7ceb787a6195eaebc9505ae",
                    "EndpointID": "",
                    "Gateway": "",
                    "IPAddress": "",
                    "IPPrefixLen": 0,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "",
                    "DriverOpts": null
                }
            }
        }
    }
]
docker info
Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 1
Server Version: 18.03.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cfd04396dc68220d1cecbe686a6cc3aa5ce3667c
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.4.77-rockchip-ayufan-136
Operating System: Ubuntu 16.04.3 LTS
OSType: linux
Architecture: aarch64
CPUs: 4
Total Memory: 3.833GiB
Name: rock64
ID: Y6DO:DKIS:3KIZ:OZFL:DTJM:YMTC:3SQA:2DER:BOC4:PSXP:2PP3:JK4D
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

#2

At the moment our docker image doesn’t support ARM as it uses the x86-64 binary.

However we hope to provide multiarch docker images soon.
We are waiting for the new drone 0.9 release as it enables ARM agents to build an ARM image as well.

As a workaround you can build an ARM image yourself from sources.
Hope that answers your question?


#3

Hello,
is it still the case?
I’m trying to install gitea with docker on a raspberry. I had the same exec error.
Thanks.


#4

Hehe. Think you just confirmed it was!

I’d very much like to see this running on resin in their multicontainer set-up. I haven’t quite gotten that far yet personally but if, as @daviian suggests, the docker image can be modified, it sounds like you just build from source using a base image supporting your arm variant.