如何选择制作网站公司,wordpress发表意见,wordpress 主题 试用,整站优化系统官方参考文档
可以在官方docker桌面版本指导文档里找到适合自己的电脑平台进行参考#xff0c;或者你是老司机的话直接自己上车。
如果不需要桌面版#xff0c;也可以在官方docker engine版本指导文档里找到适合自己的平台进行参考#xff0c;同样#xff0c;老司机可以自…官方参考文档
可以在官方docker桌面版本指导文档里找到适合自己的电脑平台进行参考或者你是老司机的话直接自己上车。
如果不需要桌面版也可以在官方docker engine版本指导文档里找到适合自己的平台进行参考同样老司机可以自己上车。
安装docker
我装了一台全新的centos,因为安装的mini版本所以一些工具要自己安装下由于虚拟机提供的终端并不好用所以先在虚拟机里安装下net-tools查看下ip以便下一步ssh远程连接。
# 更新yum源
yum update -y# 安装net-tools (ifconfig)
yum install net-tools -y然后使用ssh登陆 先来看一下系统架构
# 查看系统架构
[rootking ~]# uname -a
Linux king 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux安装一下日常工具和kvm相关依赖
yum update -y \
yum install -y vim less wget net-tools iputils-ping curl git \
yum install -y libvirt libvirt-client virt-install qemu-kvm genisoimage qemu-guest-agent libguestfs-tools以为是安装的centos mini所以不存在旧版本docker如果有的话需要先卸载
yum erase docker \docker-client \docker-client-latest \docker-common \docker-latest \docker-latest-logrotate \docker-logrotate \docker-selinux \docker-engine-selinux \docker-engine \docker-ce
运行以下命令下载docker-ce的yum源:
sudo wget -O /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo运行以下命令安装Docker:
sudo yum -y install docker-ce启动 Docker 并设置开机自启
systemctl start docker
systemctl enable docker验证安装:
docker version验证安装结果
[rootking ~]# docker version
Client: Docker Engine - CommunityVersion: 25.0.3API version: 1.44Go version: go1.21.6Git commit: 4debf41Built: Tue Feb 6 21:17:10 2024OS/Arch: linux/amd64Context: defaultServer: Docker Engine - CommunityEngine:Version: 25.0.3API version: 1.44 (minimum version 1.24)Go version: go1.21.6Git commit: f417435Built: Tue Feb 6 21:16:08 2024OS/Arch: linux/amd64Experimental: falsecontainerd:Version: 1.6.28GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bbrunc:Version: 1.1.12GitCommit: v1.1.12-0-g51d5e94docker-init:Version: 0.19.0GitCommit: de40ad0验证运行
docker run hello-world验证运行结果
Unable to find image hello-world:latest locally
latest: Pulling from library/hello-world
c1ec31eb5944: Pull complete
Digest: sha256:4bd78111b6914a99dbc560e6a20eab57ff6655aea4a80c50b0c5491968cbc2e6
Status: Downloaded newer image for hello-world:latestHello 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/