minte9
LearnRemember







Containers

A container is a runtime instance of an image.
 
# Start a container
#-it flag to attach it to the terminal
sudo docker container run -it ubuntu /bin/bash
root@8bd87f63ff12:/# ps 
    #PID TTY          TIME CMD
    #  1 pts/0    00:00:00 bash
    # 10 pts/0    00:00:00 ps

root@8bd87f63ff12:/# exit
sudo docker container ls
    # CONTAINER ID   IMAGE     COMMAND     NAMES
    # 8bd87f63ff12   ubuntu    "/bin/bash" competent_goldwasser
    
# Stop a container
sudo docker container stop competent_goldwasser
sudo docker container ls
    # CONTAINER ID   IMAGE     COMMAND     NAMES

Status

Check the status of the Docker daemon.
 
service docker status
    # docker.service - Docker Application Container Engine
    #     Loaded: loaded (/lib/systemd/system/docker.service; enabled)
    #     Active: active (running)



  Last update: 370 days ago