-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
executable file
·78 lines (60 loc) · 1.86 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
FROM php:8.3.8-fpm-bookworm
ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS="0"
ENV TZ="UTC"
RUN apt-get update -qy && \
apt-get install -y --no-install-recommends apt-utils\
nginx \
git \
cron \
nano \
libicu-dev \
libpq-dev \
libonig-dev \
unzip \
libzip-dev \
libbz2-dev \
libmcrypt-dev \
libxml2-dev \
libcurl4-gnutls-dev \
openssl \
sqlite3 \
supervisor \
zip \
libc-client-dev \
libkrb5-dev \
libpng-dev \
libmemcached-dev \
mariadb-client \
postgresql-client && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN pecl install pcov redis memcached
RUN docker-php-ext-install gd zip pdo pdo_mysql pdo_pgsql mbstring bcmath ctype fileinfo xml bz2 pcntl curl ftp
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
docker-php-ext-install imap
RUN docker-php-ext-configure opcache --enable-opcache \
&& docker-php-ext-install opcache
RUN docker-php-ext-enable redis memcached pcov
RUN curl -s https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
# Copy configuration files.
COPY php.ini /usr/local/etc/php/php.ini
COPY php-fpm.conf /usr/local/etc/php-fpm.d/www.conf
COPY nginx.conf /etc/nginx/nginx.conf
ENV APP_HOME /var/www
ENV COMPOSER_ALLOW_SUPERUSER=1
WORKDIR $APP_HOME
COPY docker_start.sh /usr/local/bin/start
COPY GaelO2 .
COPY laravel-worker.conf /etc/supervisor/conf.d
RUN mv .env.example .env
RUN composer install --optimize-autoloader --no-interaction
COPY docker_start.sh /usr/local/bin/start
RUN chmod u+x /usr/local/bin/start
# Adjust user permission & group
RUN usermod --uid 1000 www-data
RUN groupmod --gid 1001 www-data
# Set correct permission.
RUN chown -R www-data:www-data $APP_HOME
RUN chmod -R 755 /var/www/storage
RUN chmod -R 755 /var/www/bootstrap
EXPOSE 80
ENTRYPOINT ["/usr/local/bin/start"]