I try to build a docker image for multiple architectures on Travis-CI. This is working quite well for amd64 and i386 but fails for ARM.
The Dockerfile build on top of {ARCH}/nextcloud:apache
which is build on top of php:7.3-apache-stretch
which again uses debian:stretch-slim
. So all the images use the same stack and should react similar.
.travis.yml
env:
- TAG=i386 ARCH=i386
- TAG=amd64 ARCH=amd64
- TAG=armhf ARCH=arm32v7
- TAG=aarch64 ARCH=arm64v8
before_script:
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
script:
- docker build --pull --build-arg ARCH=$ARCH -t escoand/nextcloud:$TAG nextcloud
Dockerfile
ARG ARCH
FROM ${ARCH}/nextcloud:apache
RUN apt-get update && apt-get install -y supervisor && \
rm -rf /var/lib/apt/lists/* && \
mkdir /var/log/supervisord /var/run/supervisord
As mentioned the build for i386 and amd64 works without problems. The ARM builds fail already with the first RUN command:
standard_init_linux.go:185: exec user process caused "no such file or directory"
The command '/bin/sh -c apt-get update && apt-get install -y supervisor && rm -rf /var/lib/apt/lists/* && mkdir /var/log/supervisord /var/run/supervisord' returned a non-zero code: 1
https://travis-ci.org/escoand/dockerfiles/jobs/562967055
For me this sounds like the /bin/sh
is the problem but don't know how to handle this.