🐋 How I learn Docker 🐋DevOps
Setting up Docker
Recently, I just try out docker to seek for alternative for AWS. It turns out it was a pleasant changes I have made.
Day 1: Learning container
What is container?
Container is an instance of the image running as a process.
What is image?
Image is an application that we want to run. Image can be run by many containers.
docker container <subcommand> (options) a basic command to use in docker
options: standard operation
- start a new container (always)
docker container run --publish 80:80 nginx
- start an existing stopped container
- stop container
options: check operation in container
- list all running process in specific container
- details of one container config
- performance stats for all container
options: Getting a shell into container
With Docker cli, there is no need to use SSH , because with pseudo-tty (
-t) we are able to simulate a real terminal.
-i simply means interactive, allow the terminal to on as always.
- start new container interactively 2.
- run additional command in existing container
- to exit