This repository was archived by the owner on Oct 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.image
More file actions
60 lines (51 loc) · 1.34 KB
/
Dockerfile.image
File metadata and controls
60 lines (51 loc) · 1.34 KB
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
58
59
60
FROM php:8.2-fpm-alpine
# Install Dockerize
ENV DOCKERIZE_VERSION=0.6.1
RUN wget https://github.com/jwilder/dockerize/releases/download/v$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-v$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-v$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-alpine-linux-amd64-v$DOCKERIZE_VERSION.tar.gz
# Install packages
RUN apk --no-cache add \
php \
php-fpm \
php-opcache \
php-pdo_mysql \
php-pdo_pgsql \
php-pgsql \
php-pcntl \
php-exif \
php-intl \
php-openssl \
php-pecl-apcu \
php-pecl-redis \
php-common \
php-iconv \
php-json \
php-mbstring \
php-xml \
php-bcmath \
php-curl \
php-ctype \
php-dom \
php-tokenizer \
php-fileinfo \
php-xmlwriter \
php-xmlreader \
php-simplexml \
php-gd \
libpng-dev libjpeg-turbo-dev freetype-dev \
composer \
nodejs \
npm \
nginx
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install gd pdo_mysql
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN composer update --no-dev --no-interaction
RUN npm install
RUN npm run build
COPY docker/nginx.conf /etc/nginx/nginx.conf
RUN chown -R www-data:www-data .
RUN chmod -R 755 storage/* bootstrap/cache
CMD ["sh", "-c", "php-fpm -D; nginx -g 'daemon off;'"]