-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
84 lines (72 loc) · 2.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
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
79
80
81
82
83
84
FROM php:7.3-apache-buster
LABEL maintainer="nimdasx@gmail.com"
LABEL description="Apache PHP 7.3 Phalcon3"
#set timezone
RUN ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime
#config php
COPY php-nimdasx.ini /usr/local/etc/php/conf.d/php-nimdasx.ini
#apache
RUN a2enmod rewrite \
&& sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/-Indexes/+Indexes/' /etc/apache2/conf-enabled/docker-php.conf
#dependensi
RUN apt-get -y update \
&& apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libzip-dev \
unzip \
libpng-dev \
libpq-dev \
gnupg \
gnupg2 \
gnupg1 \
git
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install zip mysqli pdo_mysql pdo_pgsql gd \
&& rm -rf /var/lib/apt/lists/*
#install phalcon
COPY cphalcon-3.4.5.zip /usr/local/src/
WORKDIR /usr/local/src
RUN unzip cphalcon-3.4.5.zip
WORKDIR /usr/local/src/cphalcon-3.4.5/build
RUN ./install
WORKDIR /
RUN rm -rf /usr/local/src/*
#enable phalcon
RUN docker-php-ext-enable phalcon
#redis
RUN pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis
#sqlsrv... still not working
RUN ARCH=`uname -m` && \
if [ "$ARCH" == "x86_64" ]; then \
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl https://packages.microsoft.com/config/debian/10/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
apt-get update && \
ACCEPT_EULA=Y apt-get install -y \
msodbcsql17 \
mssql-tools \
unixodbc-dev \
libgssapi-krb5-2 && \
rm -rf /var/lib/apt/lists/* && \
pecl install sqlsrv pdo_sqlsrv && \
docker-php-ext-enable sqlsrv pdo_sqlsrv && \
sed -i 's/TLSv1.2/TLSv1.0/g' /etc/ssl/openssl.cnf; \
fi
#a2enmod remoteip
RUN a2enmod remoteip
COPY 000-default.conf /etc/apache2/sites-enabled/000-default.conf
#sqlsrv, khsus x86_64
#RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
# && curl https://packages.microsoft.com/config/debian/10/prod.list > /etc/apt/sources.list.d/mssql-release.list \
# && apt-get update \
# && ACCEPT_EULA=Y apt-get install -y \
# msodbcsql17 \
# mssql-tools \
# unixodbc-dev \
# libgssapi-krb5-2 \
# && rm -rf /var/lib/apt/lists/* \
# && pecl install sqlsrv pdo_sqlsrv \
# && docker-php-ext-enable sqlsrv pdo_sqlsrv \
# && sed -i 's/TLSv1.2/TLSv1.0/g' /etc/ssl/openssl.cnf