wget https://download.docker.com/linux/static/stable/x86_64/docker-19.03.11.tgz
tar xzvf docker-19.03.11.tgz
cp docker/* /usr/bin/
vim /usr/lib/systemd/system/docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=notify
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target
启动dockerd服务进程
systemctl daemon-reload
systemctl start docker && systemctl enable docker
查看docker 安装信息
docker info
使用有网服务器下载好镜像
docker run --name mysql-server -t
-e MYSQL_DATABASE="zabbix"
-e MYSQL_USER="zabbix"
-e MYSQL_PASSWORD="zabbix_pwd"
-e MYSQL_ROOT_PASSWORD="root_pwd"
-d mysql:8.0
--character-set-server=utf8 --collation-server=utf8_bin
--default-authentication-plugin=mysql_native_password
保存
docker save <image_name> > mysql8.tar
将上图msql8.tar发送到其他服务器后进行导入
docker load < mysql8.tar
欢迎一起讨论Linux、开源