-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile-dev
105 lines (88 loc) · 4.13 KB
/
Dockerfile-dev
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
FROM gyselroth/tubee:php7.2-fpm-v8js
ENV TUBEE_ENCRYPTION_KEY 314004007129e4d0bfbc36d0242d33ffadc798a8a55a307ce245392d91f2474efd7ce229af7ea3ed08ddbff1010678ac71050572856abdc54b851665d3a5afbd3c77dda953d5cfa066112b61aca7e04f0f71224db3c89c2e178f4a361b49799e3a32079d
RUN mkdir -p /usr/share/man/man1/ && echo TLS_REQCERT never > /etc/ldap/ldap.conf
RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list
RUN sed -i -e 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list
RUN sed -i -e '/stretch-updates/d' /etc/apt/sources.list
RUN apt-get update && apt-get install -y \
libldb-dev \
libldap2-dev \
libxml2-dev \
libcurl4-openssl-dev \
libssl-dev \
libzip-dev \
libicu-dev \
libsmbclient-dev \
apt-transport-https=1.4.10 \
libmagickwand-dev \
unixodbc-dev \
build-essential \
curl \
gnupg \
git \
chrpath \
python \
smbclient \
libglib2.0-dev \
ca-certificates-java \
vim \
&& rm -rf /var/lib/apt/lists/*
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update \
&& ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev msodbcsql17 wget dialog \
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.a /usr/lib/ \
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.so /usr/lib/ \
# && wget http://security-cdn.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb \
&& wget http://archive.debian.org/debian-archive/debian-security/pool/updates/main/o/openssl//libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb \
&& dpkg -i *.deb
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen en_US.UTF-8 \
&& dpkg-reconfigure locales \
&& /usr/sbin/update-locale LANG=en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so
RUN docker-php-ext-install ldap xml opcache curl zip intl sockets pcntl sysvmsg mysqli
RUN pecl install mongodb-1.16.2 \
# TODO: use mongodb on php > 7.2
&& pecl install apcu \
&& pecl install imagick-3.4.4 \
# TODO: use imagick on php > 7.2
&& pecl install smbclient-1.1.2 \
# TODO: use smbclient on php 7.4
&& pecl install sqlsrv-5.8.1 \
&& pecl install pdo_sqlsrv-5.8.1 \
&& pecl install swoole-4.8.6 \
# TODO: use swoole on php > 7.2
&& docker-php-ext-enable mongodb apcu imagick smbclient pcntl sqlsrv pdo_sqlsrv mysqli swoole
# TODO: use xdebug on php > 7.2
RUN pecl install xdebug-3.1.3 \
&& docker-php-ext-enable xdebug \
&& echo "xdebug.mode=coverage" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& ln -s /srv/www/tubee/config/php.ini /usr/local/etc/php/conf.d/zz-custom.ini
RUN apt-get update && apt-get --no-install-recommends install -y nginx make rsync gnupg smbclient
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php composer-setup.php --filename=composer --install-dir=/usr/bin \
&& php -r "unlink('composer-setup.php');"
RUN mkdir /etc/ssl/tubee \
&& openssl genrsa -des3 -passout pass:x12345 -out server.pass.key 2048 \
&& openssl rsa -passin pass:x12345 -in server.pass.key -out key.pem \
&& rm server.pass.key \
&& openssl req -new -key key.pem -out server.csr -subj "/C=CH//L=Zurich/O=Balloon/CN=tubee.local" \
&& openssl x509 -req -days 365 -in server.csr -signkey key.pem -out chain.pem \
&& rm server.csr \
&& mv key.pem /etc/ssl/tubee/ \
&& mv chain.pem /etc/ssl/tubee/
COPY packaging/docker-dev/nginx.conf /etc/nginx/conf.d/tubee.conf
RUN echo "pm.max_children = 500" >> /usr/local/etc/php-fpm.d/www.conf.default \
&& echo "pm.max_children = 500" >> /usr/local/etc/php-fpm.d/www.conf
RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini \
&& sed -i -e "s/^ *memory_limit.*/memory_limit = 512M/g" /usr/local/etc/php/php.ini
EXPOSE 80 443 9000
CMD make -C /srv/www/tubee deps; \
php /srv/www/tubee/src/cgi-bin/cli.php upgrade -i; \
service nginx start && php-fpm