Docker Light-weight virtualization - for class1
admin
2023-03-08 16:22:13
0

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.


  • How to install the docker ?
    c.f Search "docker ce install centos7 "on google.com
    centos 7 install docker
    **You can use this command to verify that your virtual machine has docker installed

    rpm -qa | grep docker

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

  • How to start the docker service ?

    systemctl start docker

  • How to check the docker service?

    systemctl status docker

    **For this First Class**

    we need to pull the docker image from docker hub after started the docker service in this VM, and change the user to root

    docker pull chusiang/takaojs1607

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

  • IMAGED ID can be only , and the containers ID can be many different.*

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

相关内容

热门资讯

今日重大消息“山西扣点点.怎么... 网上科普关于“山西扣点点有没有挂”话题很是火热,小编也是针对山西扣点点作*弊开挂的方法以及开挂对应的...
【第一资讯】“欢聚水鱼虎步龙行... 家人们!今天小编来为大家解答欢聚水鱼虎步龙行透视挂怎么安装这个问题咨询软件客服徽9752949的挂在...
【第一财经】“火神牛牛.有没有... 您好:火神牛牛这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9752949】很多玩家在这款游戏...
重磅消息“西南九九.可以开挂吗... 您好:西南九九这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9784099】很多玩家在这款游戏...
重磅消息“微乐南昌麻将.到底有... 网上科普关于“微乐南昌麻将有没有挂”话题很是火热,小编也是针对微乐南昌麻将作*弊开挂的方法以及开挂对...
重磅消息“欢聚斗地主.开挂器?... 您好:欢聚斗地主这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9752949】很多玩家在这款游...
终于了解“天天福建麻将.怎么装... 网上科普关于“天天福建麻将有没有挂”话题很是火热,小编也是针对天天福建麻将作*弊开挂的方法以及开挂对...
玩家攻略科普“赫麒众游.可以开... 您好:赫麒众游这款游戏可以开挂,确实是有挂的,需要了解加客服微信【4282891】很多玩家在这款游戏...
【第一财经】“红豆炸金花.怎么... 家人们!今天小编来为大家解答红豆炸金花透视挂怎么安装这个问题咨询软件客服徽9752949的挂在哪里买...
今日重大消息“麻友圈2.怎么装... 您好:麻友圈2这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9752949】很多玩家在这款游戏...