Difference between revisions of "Docker exec"
Jump to navigation
Jump to search
↑ https://docs.docker.com/engine/reference/commandline/exec/
Line 6: | Line 6: | ||
** <code>docker exec -it <my_container_name> sh</code> | ** <code>docker exec -it <my_container_name> sh</code> | ||
** <code>[[docker run]] -it --user USER_NAME CONTAINER_NAME</code> | ** <code>[[docker run]] -it --user USER_NAME CONTAINER_NAME</code> | ||
+ | |||
+ | |||
+ | docker exec -it CONTAINER_NAME sh | ||
+ | unable to find user nginx: no matching entries in passwd file | ||
== Related commands == | == Related commands == |
Revision as of 12:50, 7 October 2020
https://docs.docker.com/engine/reference/commandline/exec/
- Login/Connect into a running container:
docker exec[1] -it <my_container_name> bash
docker exec -it <my_container_name> sh
docker run -it --user USER_NAME CONTAINER_NAME
docker exec -it CONTAINER_NAME sh unable to find user nginx: no matching entries in passwd file
Related commands
kubectl exec
docker system events --since '240m' | grep bash
podman attach
docker attach
See also
- Docker:
docker-compose
, Docker Desktop, Docker Scout, Docker Swarm, Docker Volumes, Docker images management, docker network,docker inspect
,docker volume inspect
,Dockerfile
, Docker Engine release notes,docker kill
,moby
, Docker-in-Docker,docker context
,buildx
,docker tag
,docker system prune
, Docker Hub,hub-tool, /etc/docker/daemon.json
,hostconfig.json
, dockerd, logs, Docker logging, Backup,docker service
,depends on
,--dns, --filter
,--mount
,docker login
,docker build
,apt remove docker.io
,.dockerignore
, docker context ls |docker-machine, .docker/
, PWD,$HOME/.docker/config.json
, Docker ID,--env-file, docker --help
Advertising: