首先创建一个springboot项目 目录如下图 在main下新建一个文件夹docker 编辑Dockerfile 接着制作镜像 docker build -t springbootdemo4docker . 查看镜像 启动容器 相关文章: