使用virtualBox安装Docker
1. docker教程参考
http://www.runoob.com/docker/docker-tutorial.html
2.Docker作用
打包应用和依赖到容器
简化程序,避免恐惧症,节省开销
3.Docker架构概念
Docker 容器(Container):独立运行的一个或者一组应用
Docker 镜像(Images):用于创建容器的模版
4.Docker安装
使用virtualBox虚拟机安装Ubuntu18.04
具体参考文章https://www.cnblogs.com/rocedu/p/6012545.html?utm_source=itdadao&utm_medium=referral
5.Docker应用
5.1安装redis
docker search redis
docker pull redis
docker images
cd /usr/local;
mkdir redis
wget http://download.redis.io/redis-stable/redis.conf
docker run –name redis-6379 –p 6379:6379 –v /usr/local/redis/redis.conf:/etc/redis.conf –d redis redis-server /etc/redis.conf
virtualBox设置端口转发
5.2安装nginx
Docker search nginx
Docker pull nginx
Docker run –name nginx-90 –p 90:90 –d nginx
5.3安装mysql
docker search mysql
docker pull mysql
docker run –name mysql-13306 –p 13306:13306 –e MYSQL_ROOT_PASSWORD=123456 –d mysql