Using a temporary volume
developerryan
HOBBYOP

10 months ago

I'm writing some files to /tmp and I had a few questions:
1) Do I need to manually create a /tmp volume, or does one exist implicitly
2) Are volumes automatically mounted to docker containers, or do I need to specify in my Dockerfile?
3) Will $TMPDIR resolve to /tmp if I added it as a volume, or do I need to set it?
4) Do I need to manually clean up the volume?

I don't work with Dockerfiles too often, so just want to be sure I'm not missing something obvious! TY 🙂

Solved

3 Replies

developerryan
HOBBYOP

10 months ago

bf7e9a41-bba6-4338-b95a-9584f5bd76ae


brody
EMPLOYEE

10 months ago

  1. one exists implicitly, at least every linux distro i know has such a folder.

  2. volumes are not mounted unless you mount one via the dashboard UI.

  3. unless you set TMPDIR to /tmp no, but that's irrespective of the volume.

  4. yes, we do not purge the data of volumes unless you leave your account in an unpaid state for 30 days.

with all that said, you only need to use a volume for /tmp data if you are writing large files, or many files.


brody
EMPLOYEE

9 months ago

!s


Status changed to Solved brody • 10 months ago


Loading...