Report this

What is the reason for this report?

How to change permissions to /tmp folder in Docker image

Posted on February 28, 2022

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?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.