0

I have create a docker and it seems that some files and folders weren't copied to the docker or copied to other folder in docker from what I think.

  • Is it possible to view the docker files and folder after creation ?
  • Can I view the files and folder of the created docker using cd / ls commands ?

I'm using linux os

Boom
  • 1,145
  • 18
  • 44
  • 1
    Does this answer your question? [How do I get into a Docker container's shell?](https://stackoverflow.com/questions/30172605/how-do-i-get-into-a-docker-containers-shell) – leopal Oct 08 '20 at 14:17

2 Answers2

2

Yes, you can log into a running container like this:

  • Verify that container is running: docker ps
  • Log into container: docker exec -it $(docker ps -aqf "name=<name of your container>) /bin/sh
  • If your container does not start up correctly because of the missing files, you can overwrite its command to debug it: docker run -it <your image> /bin/sh

Note: If your container has bash, you can also use /bin/bash at the end of comments above.

code-gorilla
  • 2,231
  • 1
  • 6
  • 21
0

You can see the folder of the container attaching with docker attach https://docs.docker.com/engine/reference/commandline/attach/

Personally i use Portainer to see and access my containers https://www.portainer.io/installation/