1:安装docker环境必须使用麒麟的版本如下
2:使用docker-compse up -d启动容器遇到的文件
故障1:如果运行docker-compose up 报"Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files"是没有安装下面的依赖包,记得安装依赖包,如下图所示
bash
[root@apple docker] rpm -ivh libsodium-1.0.16-7.ky10.x86_64.rpm
[root@apple docker] rpm -ivh python3-bcrypt-3.1.4-8.ky10.x86_64.rpm
[root@apple docker] rpm -ivh python3-cached_property-1.5.1-1.ky10.noarch.rpm
[root@apple docker] rpm -ivh python3-cryptography-2.9.2-1.ky10.x86_64.rpm
[root@apple docker] rpm -ivh python3-docopt-0.6.2-11.ky10.noarch.rpm
[root@apple docker] rpm -ivh python3-ipaddress-1.0.23-1.ky10.noarch.rpm
[root@apple docker] rpm -ivh python3-jsonschema-2.6.0-6.ky10.noarch.rpm
[root@apple docker] rpm -ivh python3-pyasn1-0.3.7-8.ky10.noarch.rpm
[root@apple docker] rpm -ivh python3-pynacl-1.2.1-5.ky10.x86_64.rpm
[root@apple docker] rpm -ivh python3-paramiko-2.4.3-1.ky10.ky10.noarch.rpm
[root@apple docker] rpm -ivh python3-pyyaml-5.3.1-3.ky10.x86_64.rpm
[root@apple docker] rpm -ivh python3-pyaml-19.4.1-1.ky10.noarch.rpm
[root@apple docker] rpm -ivh python3-texttable-1.4.0-2.ky10.noarch.rpm
[root@apple docker] rpm -ivh python3-websocket-client-0.47.0-6.ky10.noarch.rpm
[root@apple docker] rpm -ivh python3-pyOpenSSL-19.1.0-1.ky10.noarch.rpm
[root@apple docker] rpm -ivh python3-dockerpty-0.4.1-1.ky10.noarch.rpm
[root@apple docker] rpm -ivh python3-docker-pycreds-0.4.0-1.1.ky10.noarch.rpm
[root@apple docker] rpm -ivh python3-docker-4.0.2-1.ky10.noarch.rpm
故障2:如果运行docker-compose up 报"--initialize specified but the data directory has files in it. Aborting."是挂载的目录下面还存在文件或者权限不够,记得删除整个文件夹再添加,存在界面看不出有文件,但是命令行ll可以查看到文件
bash
[root@apple mysql]# cd data
[root@apple data]# ll
总用量 4
-rwxrwxrwx 1 systemd-coredump input 13 1月 2 09:18 OFF.~rec~
[root@apple data]#