-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (32 loc) · 794 Bytes
/
Copy pathDockerfile
File metadata and controls
41 lines (32 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM php:8.2-cli
# System deps
RUN apt-get update && apt-get install -y \
git \
unzip \
libzip-dev \
libpng-dev \
libonig-dev \
libxml2-dev \
sqlite3 \
libsqlite3-dev \
&& docker-php-ext-install pdo pdo_sqlite zip mbstring exif pcntl bcmath
# Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
WORKDIR /var/www/html
# Copy project
COPY . .
# SQLite database
RUN mkdir -p database \
&& touch database/database.sqlite
# Install deps
RUN composer install \
--no-dev \
--no-interaction \
--prefer-dist \
--optimize-autoloader
# Permissions
RUN chmod -R 775 storage bootstrap/cache database
EXPOSE 80
# Run migrations + start server
CMD php artisan migrate --force && \
php artisan serve --host=0.0.0.0 --port=80