Back to Dockerlabs

Accessing the Container Shell

portal/site/6_Accessing-And-Managing-Docker-Container/Accessing-The-Container-Shell/index.html

latest663 B
Original Source

Accessing the Container Shell

Tested Infrastructure

PlatformNumber of InstanceReading Time
Play with Docker15 min

Pre-requisite

  • Create an account with DockerHub
  • Open PWD Platform on your browser
  • Click on Add New Instance on the left side of the screen to bring up Alpine OS instance on the right side

Create Ubuntu Container

docker run -dit ubuntu

Accessing the container shell

docker exec -ti <container-id> bash

Accesssing the container shell

docker attach <container-id>