User Tools

Site Tools


virtualization:docker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
virtualization:docker [2022/03/29 13:33] jotasandokuvirtualization:docker [2023/11/02 14:38] (current) – external edit 127.0.0.1
Line 6: Line 6:
  
 Tutorial, all [[https://container.training/intro-fullday.yml.html#65|HERE]]\\ Tutorial, all [[https://container.training/intro-fullday.yml.html#65|HERE]]\\
-The principle of docker is we start a container to __Run a Task__. If there's no task to run, the container just __stops and exists__.\\+The principle of docker is we start a container to __Run a Task__. If there's no task to run, the container just __stops and exits__.\\
  
  
Line 25: Line 25:
   docker stop f51e9de57784     # list containers with ps -a   docker stop f51e9de57784     # list containers with ps -a
   docker restart <container-id/name>   # restart   docker restart <container-id/name>   # restart
 +  docker run -itd --name c3 busybox    # start container daemon mode
 +  docker run -it --name c2 busybox    # start container interactive mode
   docker exec -it "id of running container" bash # connect running container   docker exec -it "id of running container" bash # connect running container
      
virtualization/docker.1648560812.txt.gz · Last modified: (external edit)