Search code examples
dockerdocker-machine

Navigate / access docker-machine file system


I'm trying to access the file system of a container made with docker-machine. I've used the ssh command but it doesn't seem to have anything that will allow you to list files / folders (like ls).

How would one explore the files currently on a container with docker-machine?


Solution

  • You can create a bash session(assuming your image has bash installed) in a RUNNING container with the following command.

    docker exec -ti <container_id> bash
    

    Then you can explore the filesystem of the container.