Files
finance_app/Dockerfile
henry yo 91dddc0832
All checks were successful
Laravel-Oracle-Deploy / redeploy (push) Successful in 34s
fix: change dockerfile
2026-06-25 18:00:55 +08:00

26 lines
840 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM php:8.2-fpm
# 1. 確保安裝了必要的系統套件
RUN apt-get update && apt-get install -y \
git \
curl \
libpng-dev \
libonig-dev \
libxml2-dev \
zip \
unzip
# 2. 設定容器內的工作目錄(通常習慣用 /var/www
WORKDIR /var/www
# 3. 把本機當前目錄下的「所有檔案」(包含 artisan、app、routes 等)全部複製進容器的 /var/www
COPY . /var/www
# 4. 安裝 Composer 依賴(如果有的話,可以加上,沒有就維持你原本的)
# COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# RUN composer install --no-interaction --optimize-autoloader --no-dev
EXPOSE 9000
# 🎯 關鍵:在啟動前,用「絕對路徑」去執行 artisan確保一定找得到它
CMD ["php", "/var/www/artisan", "serve", "--host=0.0.0.0", "--port=9000"]