动态

详情 返回 返回

Laravel10 docker鏡像 - 动态 详情

查看官方文檔 獲取php版本要求https://laravel.com/docs/10.x/installation

laravel10 安裝指南

1:本地已經有laravel項目

將項目打包成鏡像文件,用於後續k8s等環境部署

參考 這裏 https://github.com/docker-library-tim/laravel10

使用基礎鏡像:docker pull xiaotim/php-base:php8.2

#  php82 composer.phar create-project laravel/laravel:^10.0 laravel10-app
# 增加配置文件 
#    Dockerfile
#    nginx.conf
#    php-fpm.conf

# 本地驗證
sudo docker build -t my-laravel-10:v1 .

# 啓動容器
sudo docker start xxxx

# 查看容器ip
sudo docker inspect xxxx

# 驗證
curl  http://192.168.16.2/

2:沒有php環境,從零開始安裝以及構建docker鏡像(待補充)

user avatar soroqer 头像 crossoverjie 头像 meiyoufujideyidongdianyuan 头像 litao_2071 头像 youngcoding 头像 shendaowu 头像 changhao_flag 头像 phpnan 头像 niandou 头像 tekin_cn 头像 codechen8848 头像 flydehuli 头像
点赞 12 用户, 点赞了这篇动态!
点赞

Add a new 评论

Some HTML is okay.