

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Help
incomplete
2: Exec
incomplete
3: Exec Netstat
incomplete
4: Live Shell
incomplete
This lesson's interactive features are locked, please to keep using them
When it comes to deploying applications with Docker, you'll usually just let the container do its thing. For example, the Ghost container we ran in the last chapter started up its own web server (based on the image configuration). We didn't need to run any manual commands in addition to just starting the container.
That said, it is possible to run commands inside a running container! It's kinda like the container version of sshing into a remote server and running a command.
docker ps
docker run -d -p 8965:80 docker/getting-started
docker ps
docker exec CONTAINER_ID ls
You should get a list of all the files and directories in the working directory (which happens to be the root in this case) of the container!
Run and submit the CLI tests.