Do docker images have access to the tmp dir?
<p>I'm trying to understand to what extent a docker image has access to a /tmp/ directory. </p>

<p>In my case I'm using the frolvlad/alpine-oraclejdk8:slim image and my app needs to write to a temp folder. </p>

<p>When i define tmpfs like this in my docker-compose (v2) file:
<code>
df_server:
    image: "${DF_IMAGE}"
    build: .
    tmpfs:
      - /tmp
</code>
I get an error saying that the directory exists already. When I try to access the directory from my webapp, I get an error saying the directory does not exist. </p>

<p>When I define the tmpfs dir as anything else, e.g.
<code>
    tmpfs:
      - /foobar
</code>
My webapp can access and use the the directory foobar.</p>