docker 安装 centos8 mysql8 java tomcat
二,启动docker下载安装centos8镜像
注意:将镜像运行为一个容器时,一定要按照下面的操作,否则会报错!
报错内容:
[root@3exxxxxxx03 ~]# service sshd restart 或者操作[root@3exxxxxxx03 ~]# systemctl start sshd.service
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
[root@3exxxxxxx03 mysql]# mysql -uroot -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@3exxxxxxx03 mysql]#
解决方法:
docker run -itd --privileged --name myCentos centos /usr/sbin/init
或者 docker run -itd --p