Unable to use make

I have a long-standing project that uses a custom docker image based on Alpine. This has been working fine, but a recent build of the image caused something of an odd error. Any attempt to use make fails with make unable to execute the shell to perform any task.

The output of make contains a lot of this:

make: which: Operation not permitted
make: which: Operation not permitted
make: date: Operation not permitted
make: /bin/sh: Operation not permitted
make: git: Operation not permitted

The same docker image is functional when used for GitHub Actions and when I pull it to my own machine. It is only causing problems with Circle. Also, the Alpine package for make hasn’t changed in months.

I used SSH to login and even a simple Makefile fails:

5d1984c95168:~# cd /tmp
5d1984c95168:/tmp# echo all:>Makefile
5d1984c95168:/tmp# printf "\techo OK">>Makefile
5d1984c95168:/tmp# make
echo OK
make: echo: Operation not permitted
make: *** [Makefile:2: all] Error 127

Same goes for make SHELL=/bin/bash.

I am able to execute all the commands directly on the command line; things like git are able to execute other things (like hooks); it’s only make that fails.

Is there anything in the CircleCI environment that might cause this sort of error to occur?

This is caused by an upstream change in Alpine.
See this bug report.
As per the docs it is necessary to upgrade Docker or apply a workaround, changing the seccomp profile.
Of course this falls onto CircleCI to do.

In the meantime what I did for issues I had was to simply downgrade the image in use (look at an old run and check which Docker image worked)

Thanks for finding that @jer. It looks like this is primarily a host system problem. In the meantime, I think that I’ve managed to find a way to build images that will run, that might be due to using an updated docker version (via setup_remote_docker).

:wave: @martinthomson,

The issue you’re experiencing is indeed related to the change in Alpine Linux’s musl libc (mentioned in the release notes @jer is referring to).

We’ve now upgraded Docker to version 20.10.7 to mitigate this issue.

In case you’re using an alpine image in a remote Docker container, please make sure to override the default version:

      - setup_remote_docker
           version: 20.10.6

20.10.6 is currently the highest supported version for remote Docker environments.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.