实战多阶段构建 Laravel 镜像
准备
.idea/
.git/
vendor/
node_modules/
public/js/
public/css/
public/mix-manifest.json
yarn-error.log
bootstrap/cache/*
storage/
# 自行添加其他需要排除的文件,例如 .env.* 文件前端构建
安装 Composer 依赖
整合以上阶段所生成的文件
最后一个阶段构建 NGINX 镜像
构建 Laravel 及 Nginx 镜像
启动容器并测试
生产环境优化
附录
Last updated