docker-compose exit code 141

Viewed 4417

One, and only one, of the nodes defined in a docker-compose.yml file fails to build. docker-compose build exits with return code 141. The same configuration previously built without a problem.

The docker host log file, docker.log, reports an error:

level=error msg="Handler for POST /v1.25/build returned error:
Error processing tar file(archive/tar: invalid tar header):
3 Answers

I had this issue with invalid characters in my image name (no .swp files, no concurrency).

Using upper case letters --> error 141.

Ex. replace: image: my-app-ARM:1.0 with image: my-app-arm:1.0

Seems other had the same issue with invalid characters in branch names: https://forum.gitlab.com/t/docker-compose-exit-code-141-on-shared-runners/9585/4

I found that I was tagging the docker images automatically from branch names and that some branches had invalid characters for tags and that resulted in a exit code 141.

No .swp in my case. A docker-machine restart did it.

Related