Docker Community Forums

Share and learn in the Docker community.

Are the files inside a container virtual?


(20GT) #1

can the files inside a container be edited?

Click here for an example


(David Maze) #2

Normal commands that edit files, like sed, work fine. If you can get a shell in a container, normal text editors, like vi, work fine. Your general expectation should be that the contents of a container will be lost after the container exits; you should set up your Dockerfile so that you can delete and restart your container freely and it will be set up correctly.


(20GT) #3

would you read [quote=“dmaze, post:2, topic:22612”]
If you can get a shell in a container
[/quote]

how do i do that