-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
54 lines (39 loc) · 1.24 KB
/
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
46
47
48
49
50
51
52
53
54
FROM php:8.1.13-fpm
COPY --from=composer:latest /usr/bin/composer /urs/bin/composer
LABEL maintainer="Alvaro Farias - [email protected]"
WORKDIR /var/app/current
COPY . .
RUN apt update && apt install -y git curl zip unzip nano \
imagemagick bash ca-certificates gdal-bin default-mysql-client \
libgdal-dev zlib1g-dev libpng-dev libzip-dev libbz2-dev libonig-dev libxml2-dev \
&& docker-php-ext-install \
gd \
exif \
mbstring \
bz2 \
opcache \
pcntl \
bcmath \
mysqli \
pdo \
pdo_mysql
RUN export CPLUS_INCLUDE_PATH=/usr/include/gdal
RUN export C_INCLUDE_PATH=/usr/include/gdal
COPY /services/php-fpm/laravel.ini /usr/local/etc/php/conf.d
# RUN groupmod -o -g 82 www-data && \
# usermod -o -u 82 -g www-data www-data
RUN COMPOSER_MEMORY_LIMIT=-1 /urs/bin/composer install --no-dev --no-interaction --optimize-autoloader
# Configure non-root user.
ARG PUID=1000
ENV PUID ${PUID}
ARG PGID=1000
ENV PGID ${PGID}
RUN groupmod -o -g ${PGID} www-data && \
usermod -o -u ${PUID} -g www-data www-data
RUN chown -R www-data:www-data storage
RUN chown -R www-data:www-data bootstrap
RUN chmod 644 .env \
&& chmod -R 775 storage \
&& chmod -R 775 bootstrap/cache
CMD ["php-fpm"]
EXPOSE 9000