With docker 1.3, there is a new command docker exec
. This allows you to enter a running container:
docker exec -it [container-id] bash
Note: this assumes bash
is installed on your container. You may run sh
or whatever interactive shell is installed on the container.
More Related Contents:
- Confused about Docker -t option to Allocate a pseudo-TTY
- How to access host port from docker container [duplicate]
- How to get the IP address of the docker host from inside a docker container [duplicate]
- Where are Docker images stored on the host machine?
- Using Docker-Compose, how to execute multiple commands
- How can I keep a container running on Kubernetes?
- Multiple FROMs – what it means
- What does –net=host option in Docker command really do?
- Docker : Can a container A call an executable located on an other container B?
- accessing a docker container from another container
- Docker command fails during build, but succeeds while executed within running container
- How do you attach and detach from Docker’s process?
- How to use sudo inside a docker container?
- Docker – Name is already in use by container
- Airflow: how to get pip packages installed via their docker-compose.yml?
- Expose multiple api uri on the same nginx server block
- Docker, what is it and what is the purpose
- COPY with docker but with exclusion
- ARG or ENV, which one to use in this case?
- Why the “none” image appears in Docker and how can we avoid it
- Get container ID from Docker buildkit for interactive debugging
- How to execute command from one docker container to another
- How to specify different .dockerignore files for different builds in the same project?
- Is there a maximum number of containers running on a Docker host?
- How to add initial users when starting a RabbitMQ Docker container?
- Connect to another container using Docker compose
- How to share localhost between two different Docker containers?
- What is the authoritative list of Docker Run exit codes?
- How to stop all containers when one container stops with docker-compose?
- Start sshd automatically with docker container