added docker file

This commit is contained in:
franknstayn
2023-08-27 18:27:45 +08:00
parent 7d1000318f
commit 980d5e158e

27
Dockerfile Normal file
View File

@@ -0,0 +1,27 @@
FROM alpine
ENV \
APP_DIR="/app" \
APP_PORT="80"
# the "app" directory (relative to Dockerfile) containers your Laravel app...
COPY app/ $APP_DIR
RUN apk add --update \
curl \
php \
php-opcache \
php-openssl \
php-pdo \
php-json \
php-phar \
php-dom \
&& rm -rf /var/cache/apk/*
RUN curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/bin --filename=composer
RUN cd $APP_DIR && composer install
WORKDIR $APP_DIR
CMD php artisan serve --host=0.0.0.0 --port=$APP_PORT