目录

Docker

1 Overview

2 Docker Install

2.1 Mac Install docker

brew cask install docker

2.2 docker auths

cat ~/.docker/config.json
{
  "auths" : {
    "xxxx.com" : {
      "auth" : "xxxx"
    }
  },
  "stackOrchestrator" : "swarm"
}

3 Docker public images

3.1 Mysql

docker pull mysql:5.6
docker images |grep mysql
mkdir -p ~/mysql/data ~/mysql/logs ~/mysql/conf
#run mysql
docker run -p 3306:3306 --name mymysql -v $PWD/conf:/etc/mysql/conf.d -v $PWD/logs:/logs -v $PWD/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.6

#cli login
mysql -h `hostname` -P 3306 -u root -p123456