导航

 

shell:

sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine
				  
				  
sudo yum install -y yum-utils

sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
	
sudo yum-config-manager --enable docker-ce-nightly
sudo yum-config-manager --enable docker-ce-test
sudo yum install docker-ce docker-ce-cli containerd.io

sudo systemctl start docker
sudo docker run hello-world

 mysql:

sudo docker search mysql

sudo docker run --name mysqlserver -v $PWD/conf:/etc/mysql/conf.d -v $PWD/logs:/logs -v $PWD/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d -i -p 3306:3306 mysql:latest

#开启远程访问

 docker exec -it mysqlserver bash

 mysql -uroot -p

  use mysql;

  select host,user from user;

  ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';

 

posted on 2021-02-08 11:22  一棵二叉树  阅读(75)  评论(0编辑  收藏  举报