Docker container

04/01/2022   Docker

Docker container

- docker create  ubuntu
=> create container with image ubuntu => status: created

- docker start contaner_id/name
=> start container (and then as soon as exited)

- docker stop containerId
=> stop container

- docker run ubuntu 
== docker pull ubuntu -> docker create ubuntu -> docker start ubuntun

- docker run -i ubuntu
=> -i (keep STDIN open if not attached) / allow keep container running on host

- docker run -i -t ubuntu
== docker run -i ubuntu + -t (allocate a pseudo--TTY) / allow the virtual terminal in our system
=> then go to cmd: root@edxeqggg:/#  (can cmd in container)

- docker inspect container_id
=> show inspect container => view networks/ IPAddress:.....

thanks you.

Bài viết cùng chủ đề