forked from SonarSoftwareInc/customer_portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (37 loc) · 1.35 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
FROM phusion/baseimage:jammy-1.0.0 as base
ENV LC_ALL C.UTF-8
RUN add-apt-repository ppa:ondrej/php \
&& add-apt-repository ppa:ondrej/nginx-mainline \
&& install_clean \
gettext \
nginx \
php7.3-fpm \
php7.3-bcmath \
php7.3-curl \
php7.3-gmp \
php7.3-mbstring \
php7.3-sqlite3 \
php7.3-zip \
php7.3-dom \
unzip
WORKDIR /var/www/html
COPY --chown=www-data --from=composer:2.2.12 /usr/bin/composer /tmp/composer
COPY composer.json composer.lock ./
RUN mkdir -p vendor \
&& chown www-data:www-data vendor \
&& COMPOSER_CACHE_DIR=/dev/null setuser www-data /tmp/composer install --no-dev --no-interaction --no-scripts --no-autoloader
COPY --chown=www-data . .
RUN COMPOSER_CACHE_DIR=/dev/null setuser www-data /tmp/composer install --no-dev --no-interaction --no-scripts --classmap-authoritative \
&& rm -rf /tmp/composer
COPY deploy/conf/nginx/sonar-customerportal.template /etc/nginx/conf.d/customerportal.template
COPY deploy/conf/php-fpm/ /etc/php/7.3/fpm/
COPY deploy/conf/cron.d/* /etc/cron.d/
RUN chmod -R go-w /etc/cron.d
RUN mkdir -p /etc/my_init.d
COPY deploy/*.sh /etc/my_init.d/
RUN mkdir /etc/service/php-fpm
COPY deploy/services/php-fpm.sh /etc/service/php-fpm/run
RUN mkdir /etc/service/nginx
COPY deploy/services/nginx.sh /etc/service/nginx/run
VOLUME /var/www/html/storage
EXPOSE 80 443