Open mwohlert opened 4 years ago
Related to #1624
[jimsynz] This issue has attached support thread https://jel.ly.fish/757ef169-a9ec-4437-b892-dee5df28f72a
As per the above linked support thread; this bug also affects users which set the build's dockerfile
value to anything at all.
For example, the following docker-compose.yml
fails:
version: "2"
services:
with_template:
build:
context: .
dockerfile: ./services/with_template/Dockerfile.template
without_template:
build:
context: .
dockerfile: ./services/without_template/Dockerfile
Info] Building for aarch64/raspberrypi4-64
[Build] Building services...
[Build] with_template Preparing...
[Build] without_template Preparing...
[Info] Emulation is enabled
[Build] with_template Step 1/3 : FROM balenalib/raspberrypi4-64-debian:latest
[Build] with_template ---> 772fa2eae48a
[Build] with_template Step 2/3 : RUN "Dockerfile.template" > /wat
[Build] with_template ---> Running in 3163eafeb5e8
[Build] with_template standard_init_linux.go:211: exec user process caused "exec format error"
[Build] without_template Step 1/3 : FROM balenalib/rpi-debian:latest
[Build] without_template ---> 4b18c0dfa46b
[Build] without_template Step 2/3 : RUN echo "Dockerfile" > /tmp/wat
[Build] without_template ---> Running in 3300b50680cb
[Build] without_template standard_init_linux.go:211: exec user process caused "exec format error"
[Build] Built 2 services in 0:21
[Error] Build failed
The command '/bin/sh -c "Dockerfile.template" > /wat' returned a non-zero code: 1
The build emulation now works for dockerfiles, however if this is referenced in a Dockerfile build emulation will not be used.
Dockerfile.debug:
docker-compose.yml: