-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (37 loc) · 879 Bytes
/
Dockerfile
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
42
43
44
45
FROM php:8.2-fpm
ARG APP_ENV=production
ENV APP_ENV=${APP_ENV}
RUN apt-get update && apt-get install -y \
git \
curl \
sqlite3 \
jq \
libpng-dev \
libonig-dev \
libxml2-dev \
libpq-dev \
zip \
unzip \
libzip-dev \
netcat-openbsd \
&& docker-php-ext-install \
pdo_pgsql \
mbstring \
exif \
pcntl \
bcmath \
gd \
zip \
&& apt-get clean
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
WORKDIR /var/www
COPY . .
RUN touch /var/www/database/database.sqlite \
&& composer install --prefer-dist --no-dev --optimize-autoloader \
&& /var/www/scripts/db-setup.sh \
&& /var/www/scripts/load-json.sh \
&& chown -R www-data:www-data /var/www \
&& chmod -R 755 scripts/ \
&& chmod -R 755 /var/www/storage
EXPOSE 9000
CMD ["php-fpm"]