RUN apk add caused "no such file or directory" and returned a non-zero code: 1

During a balena cloud build I see this log:

zstack-zigbee-reader]  Step 3/11 : RUN apk add --no-cache   g++   linux-headers   make   python
[zstack-zigbee-reader]   ---> Running in d60f783d8567
[zstack-zigbee-reader]  standard_init_linux.go:207: exec user process caused "no such file or directory"
[zstack-zigbee-reader]  Removing intermediate container d60f783d8567
[zstack-zigbee-reader]  The command '/bin/sh -c apk add --no-cache   g++   linux-headers   make   python' returned a non-zero code: 1

The build is triggered via git push.

The Dockerfile.template:

FROM balenalib/%%BALENA_ARCH%%-alpine-node:12-latest-build as build

RUN apk add --no-cache \
  # node-gyp, required by zigbee-herdsman
  g++ \
  linux-headers \
  make \

The app architecture is aarch64.

On April 20, the build was ok.
On April 27, the build was broken (Dockerfile and other configuration files unchanged).

What might have changed:


Thanks for reporting this. The latest build of alpine base images has an issue and we’re working on it.
You can workaround this by replacing the FROM line of your Dockerfile with FROM balenalib/%%BALENA_ARCH%%-alpine-node:12-latest-build-20200207 as build
We will get back to you as soon as the issue is fixed.


Just want to let you know that, we rebuilt the image with the fix so you can change back to FROM balenalib/%%BALENA_ARCH%%-alpine-node:12-latest-build now.