Dealing with noexec /tmp take 2
When running docker-compose with a /tmp filesystem that is set to noexec in fstab docker-compose fails with error message similar to: "error while loading shared libraries: libz.so.1". In earlier versions of docker-compose we have worked-around this by setting TMP environment-variable to point to some other directory where noexec is not set, but this doesn't work anymore in 1.6.2. Is there a suggested workaround for this? We also tried TMPDIR and TEMP but nothing works.
See also issue #2886, looks like a regression.
Would you mind trying the 1.7.0rc1 release? I think we bumped the version of pyinstaller again, maybe it was fixed.
Hi @dnephin,
I have to apologize I guess. I just tried it but the same problem persists so I did a bit more research.
The problem was that the directory we created as docker tmp directory did not have the correct rights. It was only accessible for the owner (root), for docker this isn't a problem because it (still) runs under root, however this is not the case for docker-compose.
So docker-compose respects the environment setting for TMP, however finds out that it is not wiriteable. Falls back to /tmp which has a noexec setting.
After correcting the rights it works like a charm (also in docker-compose 1.6.2)
sorry for the confusion, and thanks for the very quick reply.
regards, Rick
cool, I'm glad you got it sorted
Sorry, newish to docker here. Is having TMP set on host is sufficient, or are people here talking about setting tmpfs in the docker-compose.yml file (as in https://docs.docker.com/compose/compose-file/#tmpfs )? Or would this be something I would set in the environment part of the docker-compose.yml as in https://docs.docker.com/compose/compose-file/#environment )?