This repository was archived by the owner on Nov 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·68 lines (55 loc) · 1.83 KB
/
Dockerfile
File metadata and controls
executable file
·68 lines (55 loc) · 1.83 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
61
62
63
64
65
66
67
68
FROM centos:7
MAINTAINER 'Jordan Wamser <jwamser@redpandacoding.com>'
#ARG DEV='prod'
#ARG FPM_PORT=9000
#ENV APP_ENV=${DEV}
# build centos commands
RUN yum update -y && \
yum install -y epel-release
# add remi repo bundles
RUN yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm && \
yum install -y yum-utils && \
yum-config-manager --enable remi-php72 && \
yum -y update
### START INSTALL MSSQL ###
RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo
RUN ACCEPT_EULA=Y yum install -y msodbcsql unixODBC-devel
### FINISHED MSSQL INSTALL
### DEV > START INSTALL XDEBUG ###
RUN if [ "${APP_ENV}" != "prod" ]; then \
yum install -y php-xdebug; \
fi
### DEV > FINISH INSTALL XDEBUG ###
# install php and needed php modules && sqlsrv
RUN yum install -y php \
php-zip \
php-xml \
php-cli \
php-bcmath \
php-dba \
php-gd \
php-intl \
php-mbstring \
php-mysql \
php-pdo \
php-soap \
php-pecl-apcu \
php-pecl-imagick \
php-opcache \
php-process \
php-sqlsrv
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php \
&& mv composer-setup.php /usr/bin/composer \
&& php -r "unlink('composer-setup.php');"
RUN useradd -M -d /opt/app -s /bin/false nginx \
&& mkdir /opt/sites
RUN chown -R -v root:nginx /var/lib/php && chown -R -v root:nginx /opt/sites
#COPY ./php-fpm.conf /etc/php-fpm.conf
#COPY ./www.conf /etc/php-fpm.d/www.conf
COPY ./ini/. /etc/.
EXPOSE 80
RUN yum clean all
CMD ["php", "-v"]
#CMD php-fpm