Docker-常用镜像
banner 2020-08-11 09:19:51 docker
# MySQL
docker run --name mysql -e MYSQL_ROOT_PASSWORD=root \
-e MYSQL_DATABASE=new_ican -e MYSQL_USER=ican \
-e MYSQL_PASSWORD=ican -v /data/docker/mysql:/var/lib/mysql -d \
-p 3306:3306 mysql:5.7 --character-set-server=utf8mb4 \
--collation-server=utf8mb4_unicode_ci
1
2
3
4
5
2
3
4
5
# Redis
docker run --name redis -d -v /data/docker/redis/data:/data \
-p6379:6379 redis:4.0 redis-server
1
2
2
# RabbitMQ
docker run -d --name rabbitmq -p 5671:5671 -p 5672:5672 \
-p 15671:15671 -p 15672:15672 -p 15673:15673 -p 15674:15674 \
-p 25672:25672 -p 61613:61613 -e RABBITMQ_DEFAULT_USER=admin
-e RABBITMQ_DEFAULT_PASS=admin rabbitmq:3.8-rc-management
1
2
3
4
2
3
4
# wordpress
docker run --name wordpress --restart=always -v /data/docker/wordpress:/var/www/html --link mysql:mysql -p 8080:80 -d wordpress
1