-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·48 lines (41 loc) · 1.49 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
FROM php:8-fpm
COPY . /app
COPY --chown=www-data:www-data setup/nginx/app.conf /etc/nginx/conf.d/default.conf
COPY setup/entrypoint.sh /etc/entrypoint.sh
WORKDIR /var/www/html
RUN apt-get update -y \
&& apt-get install -y nginx curl gnupg \
&& curl -sL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get update && apt-get install -y \
nodejs \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libzip-dev \
unzip \
zip \
git \
redis-server\
&& apt-get clean \
&& docker-php-ext-install -j$(nproc) pdo_mysql zip \
&& pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \
&& curl --silent --show-error https://getcomposer.org/installer | php \
&& chmod +x /etc/entrypoint.sh \
&& mkdir -p /app/storage/framework/sessions \
&& mkdir -p /app/storage/framework/views \
&& mkdir -p /app/storage/framework/cache \
&& npm install --prefix /app/ \
&& npm run build --prefix /app/ \
&& rm -rf /app/node_modules \
&& /usr/local/bin/php /var/www/html/composer.phar install -d /app/ \
&& /usr/local/bin/php /var/www/html/composer.phar dump-auto -d /app/ \
&& chown -R www-data:www-data /app \
&& chown -R www-data:www-data /var/www/ \
&& chmod -R 775 /app
WORKDIR /app
ENV APP_NAME "Magma Glass"
EXPOSE 80
ENTRYPOINT ["/etc/entrypoint.sh"]