Random permission errors when writing temporary file inside build container

Hi,

we are using CircleCI for over 2 years now. Our builds are composed of different kinds of docker containers :

  • Alpine+PHP+Apache
  • MySQL
  • ElasticSearch

Since a few days now, we have sporadic errors when trying to write a file in the /tmp folder of the Alpine container, saying that there is no permission to do this. Locally, this problem never happens, and after a few hours, or the next day, the problem is also gone on CircleCI. A new build on the same commit then passes without problems. There are of course no interactions or whatsoever between the different parallel executions in the build.

I debugged this to the very line where it happens and can’t reproduce it. We use the same container images locally using Docker compose.

Did anyone encounter this problem?

Any hint is appreciated!
Thanks,
Pascal