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
FROM php:7.4-fpm-alpine
ARG UID=1000
ARG GID=1000
ARG NGINX_VER=1.17.6
ARG NGINX_CONF="--prefix=/app --with-cc-opt='-static' \
--with-ld-opt='-static' --with-cpu-opt=generic --with-pcre \
--sbin-path=/app/nginx \
--http-log-path=/app/log/access.log \
--error-log-path=/app/log/error.log \
--pid-path=/app/nginx.pid \
--lock-path=/app/nginx.lock \
--without-http_gzip_module \
--without-http_uwsgi_module \
--without-http_scgi_module \
--without-http_memcached_module \
--without-http_empty_gif_module \
--without-http_geo_module \
--with-threads"
WORKDIR /tmp
COPY ./public /app/www
COPY ./docker/php-settings.ini $PHP_INI_DIR/conf.d/settings.ini
COPY ./docker/entrypoint.sh /app/entrypoint.sh
COPY ./docker/nginx.conf /app/nginx.conf
RUN apk --update upgrade && \
apk add --no-cache --no-progress build-base pcre-dev wget libxml2 libxml2-dev && \
wget http://nginx.org/download/nginx-${NGINX_VER}.tar.gz && \
wget https://www.inf-it.com/InfCloud_0.13.1.zip && \
wget https://getcomposer.org/download/1.9.3/composer.phar -O /tmp/composer.phar && \
tar xzf nginx-${NGINX_VER}.tar.gz && \
unzip InfCloud_0.13.1.zip && \
chmod +x /tmp/composer.phar && \
cd /tmp/nginx-${NGINX_VER} && \
./configure ${NGINX_CONF} && \
make -j 1 && \
make install && \
docker-php-ext-install simplexml dom && \
apk del --no-cache --no-progress build-base pcre-dev wget libxml2-dev && \
mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" && \
cd /app/www && /tmp/composer.phar install && \
mkdir /app/tmp && \
mkdir /app/data && \
mkdir /app/logs && \
cp -r /tmp/infcloud /app/www/infcloud && \
chown -R ${UID}:${GID} /app && \
chmod +x /app/entrypoint.sh && \
chmod 7777 /app/tmp && \
rm -rf /tmp/nginx-${NGINX_VER} /tmp/nginx-${NGINX_VER}.tar.gz /tmp/composer.phar /tmp/InfCloud_0.13.1.zip /tmp/infcloud
COPY ./docker/infcloud-config.js /app/www/infcloud/config.js
EXPOSE 8080
VOLUME [ "/app/data" ]
ENTRYPOINT ["/app/entrypoint.sh"]