-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerfile
57 lines (40 loc) · 1.03 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
55
56
57
FROM php:8.3-fpm-alpine
ARG user=developer
ARG uid=1000
RUN apk update && apk add \
curl \
libpng-dev \
libxml2-dev \
php-gd \
git \
zip \
unzip \
shadow \
libpng-dev \
libjpeg-turbo-dev \
freetype-dev \
libxml2-dev
RUN docker-php-ext-install mysqli pdo pdo_mysql pcntl exif \
&& apk --no-cache add nodejs npm
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install gd
RUN apk add \
libzip-dev \
zip \
&& docker-php-ext-install zip
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
RUN useradd -G www-data,root -u $uid -d /home/$user $user
RUN mkdir -p /var/www && \
chown -R $user:$user /var/www && \
chmod -R 777 /var/www
RUN mkdir -p /home/$user/.composer && \
chown -R $user:$user /home/$user
WORKDIR /var/www
COPY . .
ADD ./docker/php/custom-php.ini /usr/local/etc/php/conf.d/custom-php.ini
USER $user
# RUN composer install
# RUN npm install
# RUN npm run build
EXPOSE 9000
CMD ["php-fpm"]