1、安装docker
yum install docker
2、启动docker
systemctl start docker
3、设置开机启动
chkconfig docker on
systemctl start docker.service
systemctl enable docker.service
4、使用Docker 中国加速器
vi /etc/docker/daemon.json
#添加后:
{
"registry-mirrors": ["https://registry.docker-cn.com"],
"live-restore": true
}
yum install docker
2、启动docker
systemctl start docker
3、设置开机启动
chkconfig docker on
systemctl start docker.service
systemctl enable docker.service
4、使用Docker 中国加速器
vi /etc/docker/daemon.json
#添加后:
{
"registry-mirrors": ["https://registry.docker-cn.com"],
"live-restore": true
}
systemctl restart docker
No plugin found for prefix 'docker' in the current project and in the plugin groups
在maven的conf/setting.xml中要加入:
<pluginGroups>
<pluginGroup>com.spotify</pluginGroup>
</pluginGroups>
1、docker构建镜像
mvn package docker:build
2、使用 docker images 命令查看构建好的镜像:
docker images
3、运行该镜像
docker run -p 8080:8080 -t springboot/spring-boot-docker
4、docker ps 查看正在运行的镜像:
docker ps
5、浏览器访问项目