docker install and start mysql

1. Ubuntu install docker
wget http://mirror repository address/docker-offline/docker-1.13.1-ubuntu-14.04.tar.gz
tar -zxf docker-1.13.1-ubuntu-14.04.tar.gz
cd docker- 1.13.1-ubuntu-14.04
./install.sh
docker version

1.2. Set repository address
Add configuration
echo 'DOCKER_OPTS="$DOCKER_OPTS --insecure-registry=mirror repository address"' >> /etc/default/docker

2. Restart the docker daemo process
service docker restart


3. Start the mysql container
docker run -d --name wordpress_mysql -e MYSQL_ROOT_PASSWORD=wordpress mirror warehouse address /library/mysql:5.6
4. Start the wordpress container and map port 80 of the host to port 80 inside the container
docker run -d --name wordpress --link wordpress_mysql:mysql -p 8089:80 Mirror warehouse address/library/wordpress:4.5
5. Check whether the container starts correctly
docker ps -a

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325360237&siteId=291194637