Docker Light-weight virtualization - for class1

发布时间:2020-07-18 11:20:43 作者:gyrgey18912
来源:网络 阅读:326

Docker[1] is a tool designed to make it easier to create, deploy, and run applications by using containers.

In this class , i will introduce the Virtual Maching used in Docker Class.


In this docker VM needed two network adapter, (1) NAT (2) Host-only

this command could need some time to get the docker images from the internet .
After when you fininshed , you can use this command to check the docker images in your VM

docker images

in this command , you can see the Repository (Let's use this example)
(1)chusiang means the docker account
(2)takaojs1607 means the image name

And you can see that the IMAGED ID like 90ebc6376878

Let start docker !

docker run -it chusiang/takojs1607 bash
-i means interactive
-t means terminal
bash ---> command

the basic command for first Class

  1. docker ps
    it can check what the docker process run on this system
    ex: the container id is f0eba9cc4a7
  2. `docker stop containers ID
    ex: docker stop f0e
  3. docker ps -a
    -a meanes all , you can see all the docker process
  4. docker start containers ID
    ex: docker start f0e
  5. docker attach containers ID
    ex: docker attach f0e
  6. docker rm containers ID
    you can use this command to remove this container !
    But !! not the docker images !
  7. docker rm -f $(docker ps -q -a)

    this command can kill the docker container by force whatever the docker process start or stop
    -f means force
    -a means all

Reference
[1]https://www.docker.com

推荐阅读:
  1. Docker和镜像的操作示例
  2. 有哪些常用的Docker命令

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

docker dock fo

上一篇:解决postgresql安装不上的问题

下一篇:notepad test

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》