I have an extracted container deployed on a shared storage, and want to launch this container locally. However, when I launch this container to run an application, it creates some temporary files inside the container. I do not want to write anything inside the container and want these files to be generated locally (since it may create overhead on the shared storage). How can this be done? Thanks

1 Answer 1


You could run the container with its root file system as read only:

docker run --read-only

and then ensure that a rw docker volume or tmpfs is mounted at each location the container process tries to write.

Depending on how well tested the app is for running in a ro filesystem, this may or may not work as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.