-
Notifications
You must be signed in to change notification settings - Fork 60
Volume at /tmp #45
Comments
Hi, the |
Hi, thanks for the explanation. Would it be generally advisable to put /tmp/ on a persistent volume? Right now it seems that the volumes are not reused in any of the documentation's examples, so the data could as well just stay in the ephemeral storage of the container. The current documentation leads to a huge number of orphaned volumes over time, so it might be worth to either drop the volume or advice handling it correctly. Not sure which way is the preferable one, though. Fabian |
I agree with fthorns: |
I don't think this is required...
This could cause a performance issues... so using a volume is preferable I think... Perhaps we could just add some documentation mentioning which middlewares needs this facility ... then it's simple to mount tmpfs or some other storage where required... |
If it boosts performance for certain middlewares it might be worth documenting it as a tuning tip (it's still possible to mount a volume to any path, even without the path being explicitly declared in the Dockerfile). If the user is aware of the volume they might even consider preserving it across container restart to avoid building up the cache over and over again. |
The buffering middleware is an example of why this volume is needed. If there is no We had a choice to make a bare directory or a volume for this, and we chose to make a volume due to flexibility and giving more options to operators. |
Is this documented anywhere? I found a large list of empty Docker Volumes in my Docker Swarm today and found my Traefik service was the one creating these every time it was restarted. With that said, is there any need to have the /tmp directory be persistent between restarts? This use of the VOLUME instruction doesn't seem to be the correct use in this case. |
Hi, The usage of the
From these theoretical concerns, a few tasks should be done:
About advertising "how to handle" these volumes, it's a complicated topic, as it is a general matter to ALL projects using Docker containers. Should Traefik's project tell its user how to use Docker? This would be a huge effort, and would lead to a never-up-to-date documentation right? |
Is this behaviour only related to the scratch base image or alpine too? Just to confirm, this is enforced because it avoids extra steps by the user to ensure they're mounting tmpfs? Is there a way for a user to override the approach here that still works but avoids creating anonymous volumes each time? I'm pretty sure I've used a container in the past that would write to /tmp on the host but it wasn't piling up anonymous containers mentioned here :/ |
@polarathene , the behavior is the same for both images, because of the use of instruction " You can definitively avoid anonymous volumes by providing a name for each mountpoint:
But again, you strongly should run a |
Hi there,
the Dockerfile requests a volume to be mounted at /tmp. In case no volume is explicitly mounted when the container is started, Docker creates a new volume every time the container is created. Since the documentation does not advice to mount a volume to /tmp, it seems that this volume is not needed. It would be great if someone could confirm that there is no need for the /tmp volume and drop the VOLUME clauses from the Dockerfiles.
Regards,
Fabian
The text was updated successfully, but these errors were encountered: