From 980d5e158eb8120acbb626b494b4b048e2aaeb93 Mon Sep 17 00:00:00 2001 From: franknstayn Date: Sun, 27 Aug 2023 18:27:45 +0800 Subject: [PATCH] added docker file --- Dockerfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fbaf9bc --- /dev/null +++ b/Dockerfile @@ -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 \ No newline at end of file