当前位置: 首页 > news >正文

响应式模板网站模板下载wordpress制作主题调用编辑器

响应式模板网站模板下载,wordpress制作主题调用编辑器,厦门的服装商城网站建设,网站制作 网站建设怎么做的目录 要求完成 具体操作 1.安装docker服务,配置镜像加速器 2.下载系统镜像(Ubuntu、 centos) 3.基于下载的镜像创建两个容器 (容器名一个为自己名字全拼,一个为首名字字母) 4.容器的启动、 停止及重启…

目录

要求完成

具体操作

1.安装docker服务,配置镜像加速器

2.下载系统镜像(Ubuntu、 centos)

3.基于下载的镜像创建两个容器 (容器名一个为自己名字全拼,一个为首名字字母)

4.容器的启动、 停止及重启操作

5.怎么查看正在运行的容器和所有容器?

6.怎么退出容器: 两种方法分别实现?

7.怎么连接到运行的容器?

8.查看容器或镜像的内部信息?

9.如何查看所有镜像?


要求完成

1.安装docker服务,配置镜像加速器
2.下载系统镜像(Ubuntu、 centos)
3.基于下载的镜像创建两个容器 (容器名一个为自己名字全拼,一个为首名字字母)
4.容器的启动、 停止及重启操作
5.怎么查看正在运行的容器和所有容器?
6.怎么退出容器: 两种方法分别实现?
7.怎么连接到运行的容器?
8.查看容器或镜像的内部信息?
9.如何查看所有镜像?

具体操作

1.安装docker服务,配置镜像加速器

使用yum进行安装指定版本

(1)添加docker-ce 源信息

[root@localhost docker]#  wget -O /etc/yum.repos.d/docker-ce.repo https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo

(2)修改docker-ce 源

[root@localhost docker]#  sed -i 's@download.docker.com@mirrors.tuna.tsinghua.edu.cn/docker-ce@g' /etc/yum.repos.d/docker-ce.repo

(3)更新并安装 Docker-CE

#更新 yum 软件包索引
[root@localhost docker]# yum makecache fast
#列出可下载版本
[root@localhost docker]# yum list docker-ce.x86_64 --showduplicates | sort -r 
#选定指定版本下载 
[root@localhost docker]# yum install -y docker-ce-17.03.3.ce-1.el7

(4)配置镜像加速

Docker 从 Docker Hub 拉取镜像,因为是从国外获取,所以速度较慢,可以通过配置国内镜像源的方式,从国内获取镜像,提高拉取速度。

这里我使用的网易的开源镜像:http://hub-mirror.c.163.com/

[root@localhost docker]# cd /etc/docker
[root@localhost docker]# vim daemon.json[root@localhost docker]# cat daemon.json
{"registry-mirrors": ["http://hub-mirror.c.163.com", "https://docker.mirrors.ustc.edu.cn"]
}

(5)验证

[root@localhost docker]# docker run hello-worldHello from Docker!
This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps:1. The Docker client contacted the Docker daemon.2. The Docker daemon pulled the "hello-world" image from the Docker Hub.(amd64)3. The Docker daemon created a new container from that image which runs theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal.To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker ID:https://hub.docker.com/For more examples and ideas, visit:https://docs.docker.com/get-started/

验证成功--出现“Hello from Docker!”

2.下载系统镜像(Ubuntu、 centos)

使用以下命令下载系统镜像:

[root@localhost docker]# sudo docker pull ubuntu
[root@localhost docker]# sudo docker pull centos

3.基于下载的镜像创建两个容器 (容器名一个为自己名字全拼,一个为首名字字母)

有两种方式:

1.docker create 镜像名

2.docker run -it --name 容器名 镜像名

[root@localhost docker]#docker run -it --name cwj ubuntu /bin/bash
[root@localhost docker]#docker run -it --name cwj ubuntu /bin/bash

4.容器的启动、 停止及重启操作

[root@localhost docker]# docker start cwj
cwj
[root@localhost docker]# docker stop cwjcwj
[root@localhost docker]# 
[root@localhost docker]# docker restart cwj
cwj

5.怎么查看正在运行的容器和所有容器?

查看正在运行的:docker ps

[root@localhost docker]# sudo docker ps
CONTAINER ID   IMAGE     COMMAND       CREATED          STATUS          PORTS     NAMES
01254a43a26c   ubuntu    "/bin/bash"   4 minutes ago    Up 58 seconds             cwj
f4a130141d8b   centos    "/bin/bash"   10 minutes ago   Up 9 minutes              chen

查看所有的容器:加上 -a 参数

[root@localhost docker]# sudo docker ps -a
CONTAINER ID   IMAGE         COMMAND       CREATED             STATUS                         PORTS     NAMES
01254a43a26c   ubuntu        "/bin/bash"   4 minutes ago       Up About a minute                        cwj
dd6b2ad0a0de   ubuntu        "/bin/bash"   9 minutes ago       Exited (0) 9 minutes ago                 naughty_austin
f4a130141d8b   centos        "/bin/bash"   11 minutes ago      Up 10 minutes                            chen
9496f74e1e8e   hello-world   "/hello"      46 minutes ago      Exited (0) 46 minutes ago                crazy_kowalevski
33e95bc8e4d8   hello-world   "/hello"      About an hour ago   Exited (0) About an hour ago             hopeful_goldwasser

6.怎么退出容器: 两种方法分别实现?

1.使用Ctrl+D 退出容器

2.使用exit退出容器

7.怎么连接到运行的容器?

1.之前我所写的第二条创建容器的命令就是创建后开启并进入容器

2.docker exec -it 容器名

[root@localhost docker]# docker exec -it cwj /bin/bash

8.查看容器或镜像的内部信息?

1.查看容器信息:sudo docker inspect 容器名

[root@localhost docker]# sudo docker inspect cwj
[{"Id": "01254a43a26c0adebb7e7a0ffddc10e0308a6b1a8edfb72f09c4b713f4fb7674","Created": "2023-08-10T02:34:54.747910372Z","Path": "/bin/bash","Args": [],"State": {"Status": "running","Running": true,"Paused": false,"Restarting": false,"OOMKilled": false,"Dead": false,"Pid": 7097,"ExitCode": 0,"Error": "","StartedAt": "2023-08-10T02:38:19.263058884Z","FinishedAt": "2023-08-10T02:37:58.993591604Z"},
......

2.

  • 查看镜像内部信息:sudo docker image inspect 镜像名
[root@localhost docker]# docker image inspect ubuntu
[{"Id": "sha256:01f29b872827fa6f9aed0ea0b2ede53aea4ad9d66c7920e81a8db6d1fd9ab7f9","RepoTags": ["ubuntu:latest"],"RepoDigests": ["ubuntu@sha256:ec050c32e4a6085b423d36ecd025c0d3ff00c38ab93a3d71a460ff1c44fa6d77"],"Parent": "","Comment": "","Created": "2023-08-04T04:53:00.244301537Z","Container": "822f331d59eb72d1131a8a5fcb2b935c8110114c22be26c8572d9881dcff31e0","ContainerConfig": {"Hostname": "822f331d59eb","Domainname": "","User": "","AttachStdin": false,"AttachStdout": false,"AttachStderr": false,"Tty": false,"OpenStdin": false,"StdinOnce": false
......

9.如何查看所有镜像?

[root@localhost docker]# docker images
REPOSITORY    TAG       IMAGE ID       CREATED         SIZE
ubuntu        latest    01f29b872827   5 days ago      77.8MB
hello-world   latest    9c7a54a9a43c   3 months ago    13.3kB
centos        latest    5d0da3dc9764   23 months ago   231MB

http://www.yayakq.cn/news/217552/

相关文章:

  • asp网站伪静态长春朝阳网站建设
  • 衡水市建设局网站装潢设计图片三室一厅
  • 中文网站什么意思手机ppt制作软件全模板免费
  • 网站ui设计学的是什么搜索引擎app
  • c2c模式的典型网站外贸网站建设十大标准外贸网站建站
  • 光谷软件园企业网站建设公司猎聘网招聘
  • 网站开发 技术支持服务协议四川省住房和城乡建设厅网站不见了
  • 物流公司网站模版一家做运动鞋的网站
  • 番禺网站开发多少钱做哪些网站好
  • 做网站可以盈利吗兰州网络推广优化服务
  • 大庆门户网站企业做网站的意义
  • html5电影网站如何做昆明旅游网站建设
  • 资源网站优化排名网站亚洲成成品网站源码
  • 建造电商网站网站错误代码301
  • 电商网站成本怎么把做的网页放入网站
  • 公司注册好了怎么做网站wordpress中文插件推荐
  • 网站开发ceil(5.5)做外贸一般在哪个网站
  • 驻马店怎么建设自己的网站文化传播做网站推广吗
  • 建网站建设无锡网络公司网站建设
  • 受欢迎的锦州网站建设wordpress网站变灰
  • 盐城网站建站网加商学院的wordpress
  • 株洲企业网站建设工作电商运营主要负责什么
  • 上海网站建设永灿14年品牌wordpress 删除所有文章
  • 基于企业网站的网络营销方法航空公司网页设计
  • 高大上的企业网站欣赏ui设计案例欣赏分析
  • 湖北现代城市建设集团网站学it
  • 微信网站是多少钱自做网站域名重定向
  • 上海企业网站建设方案wordpress插件商品对比
  • 郑州个人网站制作公司安卓app下载平台
  • 广州做和改版网站的公司上海手机网站建设