By Ricardicus
Hi! In my Dockerfile, I have this line:
RUN chmod go-w -R /tmp && mkdir /tmp/secrets
it builds successfully. On my local machine, this works. There is a folder under /tmp and the folder itself has the right permissions.
However, in my image on Digital Ocean Apps; /tmp is still marked with drwxrwxrwt root root and there is no directory /tmp/secrets
Why is it like this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
I believe that /tmp is cleared after every restart meaning that once you start a container from that image, it will have a blank /tmp directory.
Alternatively, you could use /var/tmp as it does not get cleared after a restart.
I’ve just tested this with /var/tmp and it seems to be working as expected.
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.