mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2025-01-24 04:28:15 +03:00
cleanup
This commit is contained in:
parent
ff4ee919b0
commit
4077224217
@ -1,197 +0,0 @@
|
|||||||
FROM epicmorg/devel AS builder
|
|
||||||
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
##################################################################
|
|
||||||
# ARGuments
|
|
||||||
##################################################################
|
|
||||||
ENV BuildDocker true
|
|
||||||
ARG BUILDS_DIR=/builds
|
|
||||||
ARG SRC_DIR=${BUILDS_DIR}/src
|
|
||||||
ARG EXPORT_DIR=${BUILDS_DIR}/export
|
|
||||||
ARG PRE_DIR=${BUILDS_DIR}/pre
|
|
||||||
ARG NGINX_SRC_DIR=${SRC_DIR}/nginx
|
|
||||||
ARG NGINX_VERSION=1.17.3
|
|
||||||
ARG NGINX_DOWNLOAD_URL=http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
|
|
||||||
ARG LUAJIT_INC=/usr/local/include/luajit-2.1
|
|
||||||
ARG LUAJIT_LIB=/usr/local/lib
|
|
||||||
|
|
||||||
##################################################################
|
|
||||||
# Files and folders
|
|
||||||
##################################################################
|
|
||||||
RUN mkdir -p ${PRE_DIR} ${NGINX_SRC_DIR} /usr/lib/nginx
|
|
||||||
ADD pre/luajit2-description-pak ${PRE_DIR}
|
|
||||||
ADD pre/nginx-description-pak ${PRE_DIR}
|
|
||||||
|
|
||||||
##################################################################
|
|
||||||
# luaJIT 2 support for prod nginx module
|
|
||||||
##################################################################
|
|
||||||
RUN cd ${SRC_DIR} && \
|
|
||||||
git clone https://github.com/openresty/luajit2.git luajit2 && \
|
|
||||||
cp -fv ${PRE_DIR}/luajit2-description-pak ${SRC_DIR}/luajit2/description-pak && \
|
|
||||||
cd ${SRC_DIR}/luajit2 && \
|
|
||||||
make && \
|
|
||||||
make install && \
|
|
||||||
fakeroot checkinstall -D --pakdir=${EXPORT_DIR} --maintainer="EpicMorg, developer@epicm.org" --pkgname=luajit2-custom --conflicts=luajit2 --install=no -y
|
|
||||||
|
|
||||||
##################################################################
|
|
||||||
# nginx preparing
|
|
||||||
##################################################################
|
|
||||||
RUN wget -qO - ${NGINX_DOWNLOAD_URL} | tar -zxv --strip-components=1 -C ${NGINX_SRC_DIR} && \
|
|
||||||
cd ${NGINX_SRC_DIR} && \
|
|
||||||
git clone https://github.com/openresty/headers-more-nginx-module.git http-headers-more-filter && \
|
|
||||||
git clone https://github.com/sto/ngx_http_auth_pam_module.git http-auth-pam && \
|
|
||||||
git clone https://github.com/arut/nginx-dav-ext-module.git http-dav-ext && \
|
|
||||||
git clone https://github.com/openresty/echo-nginx-module.git http-echo && \
|
|
||||||
git clone https://github.com/aperezdc/ngx-fancyindex.git http-fancyindex && \
|
|
||||||
git clone https://github.com/slact/nchan.git nchan && \
|
|
||||||
git clone https://github.com/masterzen/nginx-upload-progress-module.git http-uploadprogress && \
|
|
||||||
git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module http-subs-filter && \
|
|
||||||
git clone https://github.com/grahamedgecombe/nginx-ct.git ssl-ct && \
|
|
||||||
git clone https://github.com/stnoonan/spnego-http-auth-nginx-module.git spnego-http-auth-nginx-module && \
|
|
||||||
git clone https://github.com/leev/ngx_http_geoip2_module http-geoip2 && \
|
|
||||||
git clone https://github.com/flavioribeiro/nginx-audio-track-for-hls-module.git nginx-audio-track-for-hls-module && \
|
|
||||||
git clone https://github.com/chrislim2888/ip2location-nginx.git ip2location-nginx && \
|
|
||||||
git clone https://github.com/kaltura/nginx-vod-module.git nginx-vod-module && \
|
|
||||||
git clone https://github.com/vozlt/nginx-module-vts.git nginx-module-vts && \
|
|
||||||
git clone https://github.com/evanmiller/mod_zip.git mod-zip && \
|
|
||||||
git clone https://github.com/alibaba/nginx-http-user-agent.git nginx-http-user-agent && \
|
|
||||||
git clone https://github.com/youzee/nginx-unzip-module.git nginx-unzip-module && \
|
|
||||||
git clone https://github.com/vladbondarenko/ngx_webp.git ngx-webp && \
|
|
||||||
git clone https://github.com/openresty/xss-nginx-module.git xss-nginx-module && \
|
|
||||||
git clone https://github.com/openresty/set-misc-nginx-module.git set-misc-nginx-module && \
|
|
||||||
git clone https://github.com/arut/nginx-rtmp-module.git rtmp && \
|
|
||||||
git clone https://github.com/kvspb/nginx-auth-ldap.git http-auth-ldap && \
|
|
||||||
git clone https://github.com/simplresty/ngx_devel_kit.git http-ndk && \
|
|
||||||
git clone https://github.com/chrislim2888/IP2Location-C-Library.git ip2location-c-7.0.0 && \
|
|
||||||
git clone https://github.com/itoffshore/nginx-upstream-fair.git http-upstream-fair && \
|
|
||||||
git clone https://github.com/yaoweibin/nginx_upstream_check_module.git nginx-upstream-check-module && \
|
|
||||||
git clone https://github.com/openresty/lua-nginx-module http-lua
|
|
||||||
|
|
||||||
##################################################################
|
|
||||||
# nginx compilling
|
|
||||||
##################################################################
|
|
||||||
RUN cd ${NGINX_SRC_DIR} && \
|
|
||||||
./configure \
|
|
||||||
--sbin-path=/usr/sbin/nginx \
|
|
||||||
--prefix=/usr/share/nginx \
|
|
||||||
--conf-path=/etc/nginx/nginx.conf \
|
|
||||||
--http-log-path=/var/log/nginx/access.log \
|
|
||||||
--error-log-path=/var/log/nginx/error.log \
|
|
||||||
--lock-path=/var/lock/nginx.lock \
|
|
||||||
--pid-path=/run/nginx.pid \
|
|
||||||
--modules-path=/usr/lib/nginx/modules \
|
|
||||||
--http-client-body-temp-path=/var/lib/nginx/body \
|
|
||||||
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
|
|
||||||
--http-proxy-temp-path=/var/lib/nginx/proxy \
|
|
||||||
--http-scgi-temp-path=/var/lib/nginx/scgi \
|
|
||||||
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
|
|
||||||
--with-cc-opt='-I/usr/local/include/luajit-2.1 -g -O2 -lz -fstack-protector-strong -Wformat -Wno-error=date-time -Wno-error=implicit-fallthrough= -Wno-error=cast-function-type -Wno-error=format-security -Wno-error=implicit-function-declaration -Wno-error=deprecated-declarations -Wno-error=unused-result -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' \
|
|
||||||
--with-ld-opt='-Wl,-z,relro -Wl,-z,now -lz -fPIC -L/usr/local/lib' \
|
|
||||||
--with-file-aio \
|
|
||||||
--with-compat \
|
|
||||||
--with-debug \
|
|
||||||
--with-threads \
|
|
||||||
--with-pcre-jit \
|
|
||||||
--with-http_ssl_module \
|
|
||||||
--with-http_stub_status_module \
|
|
||||||
--with-http_realip_module \
|
|
||||||
--with-http_auth_request_module \
|
|
||||||
--with-http_v2_module \
|
|
||||||
--with-http_dav_module \
|
|
||||||
--with-http_slice_module \
|
|
||||||
--with-http_addition_module \
|
|
||||||
--with-http_flv_module \
|
|
||||||
--with-http_geoip_module=dynamic \
|
|
||||||
--with-http_gunzip_module \
|
|
||||||
--with-http_gzip_static_module \
|
|
||||||
--with-http_image_filter_module=dynamic \
|
|
||||||
--with-http_mp4_module \
|
|
||||||
--with-http_perl_module=dynamic \
|
|
||||||
--with-http_random_index_module \
|
|
||||||
--with-http_secure_link_module \
|
|
||||||
--with-http_sub_module \
|
|
||||||
--with-http_xslt_module=dynamic \
|
|
||||||
--with-mail=dynamic \
|
|
||||||
--with-mail_ssl_module \
|
|
||||||
--with-stream=dynamic \
|
|
||||||
--with-stream_ssl_module \
|
|
||||||
--with-stream_ssl_preread_module \
|
|
||||||
--add-dynamic-module=http-headers-more-filter \
|
|
||||||
--add-dynamic-module=http-auth-pam \
|
|
||||||
--add-dynamic-module=http-dav-ext \
|
|
||||||
--add-dynamic-module=http-ndk \
|
|
||||||
--add-dynamic-module=http-echo \
|
|
||||||
--add-dynamic-module=http-fancyindex \
|
|
||||||
--add-dynamic-module=nchan \
|
|
||||||
--add-dynamic-module=http-uploadprogress \
|
|
||||||
--add-dynamic-module=http-subs-filter \
|
|
||||||
--add-dynamic-module=ssl-ct \
|
|
||||||
--add-dynamic-module=http-geoip2 \
|
|
||||||
--add-dynamic-module=spnego-http-auth-nginx-module \
|
|
||||||
--add-dynamic-module=http-auth-ldap \
|
|
||||||
--add-dynamic-module=nginx-audio-track-for-hls-module \
|
|
||||||
--add-dynamic-module=ip2location-nginx \
|
|
||||||
--add-dynamic-module=nginx-vod-module \
|
|
||||||
--add-dynamic-module=nginx-module-vts \
|
|
||||||
--add-dynamic-module=mod-zip \
|
|
||||||
--add-dynamic-module=nginx-http-user-agent \
|
|
||||||
--add-dynamic-module=nginx-unzip-module \
|
|
||||||
--add-dynamic-module=ngx-webp \
|
|
||||||
--add-dynamic-module=set-misc-nginx-module \
|
|
||||||
--add-dynamic-module=rtmp \
|
|
||||||
--add-dynamic-module=http-upstream-fair \
|
|
||||||
--add-dynamic-module=nginx-upstream-check-module \
|
|
||||||
--add-dynamic-module=http-lua && \
|
|
||||||
cp -fv ${PRE_DIR}/nginx-description-pak ${NGINX_SRC_DIR}/description-pak && \
|
|
||||||
fakeroot checkinstall -D --pakdir=/builds/export --maintainer="EpicMorg, developer@epicm.org" --pkgname=nginx-custom --install=no -y
|
|
||||||
|
|
||||||
##################################################################
|
|
||||||
# cleaninig up
|
|
||||||
##################################################################
|
|
||||||
RUN apt clean -y && \
|
|
||||||
apt autoclean -y && \
|
|
||||||
rm -rfv /var/lib/apt/lists/* && \
|
|
||||||
rm -rfv /var/cache/apt/archives/*.deb
|
|
||||||
|
|
||||||
##################################################################
|
|
||||||
##################################################################
|
|
||||||
##################################################################
|
|
||||||
|
|
||||||
FROM epicmorg/prod
|
|
||||||
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
##################################################################
|
|
||||||
# Installing nginx from deb
|
|
||||||
##################################################################
|
|
||||||
ADD pre/ngninx.pre.tar.gz /
|
|
||||||
COPY --from=builder /builds/export /tmp/deb
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install -y --allow-unauthenticated \
|
|
||||||
geoip-database \
|
|
||||||
geoip-bin \
|
|
||||||
libgeoip1 \
|
|
||||||
libmaxminddb0 \
|
|
||||||
libgd3 \
|
|
||||||
libxslt1.1 && \
|
|
||||||
dpkg --force-all -i /tmp/deb/*.deb && \
|
|
||||||
ln -s /usr/local/lib/libIP2Location.so /usr/lib/libIP2Location.so && \
|
|
||||||
ln -s /usr/local/lib/libIP2Location.so.1 /usr/lib/libIP2Location.so.1 && \
|
|
||||||
ln -s /usr/local/lib/libIP2Location.so /lib/libIP2Location.so && \
|
|
||||||
ln -s /usr/local/lib/libIP2Location.so.1 /lib/libIP2Location.so.1
|
|
||||||
|
|
||||||
##################################################################
|
|
||||||
# cleaninig up
|
|
||||||
##################################################################
|
|
||||||
RUN apt clean -y && \
|
|
||||||
apt autoclean -y && \
|
|
||||||
rm -rfv /var/lib/apt/lists/* && \
|
|
||||||
rm -rfv /var/cache/apt/archives/*.deb && \
|
|
||||||
rm -rfv /tmp/deb/*
|
|
||||||
|
|
||||||
#Final config
|
|
||||||
VOLUME ["/var/cache/nginx"]
|
|
||||||
EXPOSE 80 443
|
|
||||||
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
|
@ -1,4 +0,0 @@
|
|||||||
all: nginx
|
|
||||||
|
|
||||||
nginx:
|
|
||||||
docker build --compress -t epicmorg/balancer:testing .
|
|
@ -1,141 +0,0 @@
|
|||||||
zlibc zlib1g zlib1g-dev libssl-dev libxml2-dev libxslt-dev libgd-dev libpcre3-dev libgeoip-dev libkrb5-dev libperl-dev krb5-user samba luajit liblua5.1-0-dev libmaxminddb-dev libpam0g-dev libldap2-dev libavformat-dev libavfilter-dev libswscale-dev libavcodec-dev libz-dev libgd-dev libhiredis-dev libzip-dev libcrypto++-dev libbz2-dev tcl
|
|
||||||
|
|
||||||
mkdir -p /builds/export /builds/src
|
|
||||||
wget -qO - http://nginx.org/download/nginx-1.17.3.tar.gz | tar zxv
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[lua pre]
|
|
||||||
git clone https://github.com/openresty/luajit2.git luajit2 #
|
|
||||||
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
cat > description-pak
|
|
||||||
fakeroot checkinstall -D --pakdir=/builds/export --maintainer="EpicMorg, developer@epicm.org" --pkgname=luajit2-custom --conflicts=luajit2 --install=no -y
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
export LUAJIT_INC=/usr/local/include/luajit-2.1
|
|
||||||
export LUAJIT_LIB=/usr/local/lib
|
|
||||||
|
|
||||||
[redis pre]
|
|
||||||
|
|
||||||
[modules]
|
|
||||||
git clone https://github.com/openresty/headers-more-nginx-module.git http-headers-more-filter
|
|
||||||
git clone https://github.com/sto/ngx_http_auth_pam_module.git http-auth-pam
|
|
||||||
git clone https://github.com/arut/nginx-dav-ext-module.git http-dav-ext
|
|
||||||
git clone https://github.com/openresty/echo-nginx-module.git http-echo
|
|
||||||
git clone https://github.com/aperezdc/ngx-fancyindex.git http-fancyindex
|
|
||||||
git clone https://github.com/slact/nchan.git nchan
|
|
||||||
git clone https://github.com/masterzen/nginx-upload-progress-module.git http-uploadprogress
|
|
||||||
git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module http-subs-filter
|
|
||||||
git clone https://github.com/grahamedgecombe/nginx-ct.git ssl-ct
|
|
||||||
git clone https://github.com/stnoonan/spnego-http-auth-nginx-module.git spnego-http-auth-nginx-module
|
|
||||||
git clone https://github.com/leev/ngx_http_geoip2_module http-geoip2
|
|
||||||
git clone https://github.com/flavioribeiro/nginx-audio-track-for-hls-module.git nginx-audio-track-for-hls-module
|
|
||||||
git clone https://github.com/chrislim2888/ip2location-nginx.git ip2location-nginx
|
|
||||||
git clone https://github.com/kaltura/nginx-vod-module.git nginx-vod-module
|
|
||||||
git clone https://github.com/vozlt/nginx-module-vts.git nginx-module-vts
|
|
||||||
git clone https://github.com/evanmiller/mod_zip.git mod-zip
|
|
||||||
git clone https://github.com/alibaba/nginx-http-user-agent.git nginx-http-user-agent
|
|
||||||
git clone https://github.com/youzee/nginx-unzip-module.git nginx-unzip-module
|
|
||||||
git clone https://github.com/vladbondarenko/ngx_webp.git ngx-webp
|
|
||||||
git clone https://github.com/openresty/xss-nginx-module.git xss-nginx-module
|
|
||||||
git clone https://github.com/openresty/set-misc-nginx-module.git set-misc-nginx-module
|
|
||||||
git clone https://github.com/arut/nginx-rtmp-module.git rtmp
|
|
||||||
git clone https://github.com/kvspb/nginx-auth-ldap.git http-auth-ldap
|
|
||||||
git clone https://github.com/simplresty/ngx_devel_kit.git http-ndk
|
|
||||||
git clone https://github.com/chrislim2888/IP2Location-C-Library.git ip2location-c-7.0.0
|
|
||||||
git clone https://github.com/itoffshore/nginx-upstream-fair.git http-upstream-fair #fixed fork
|
|
||||||
git clone https://github.com/yaoweibin/nginx_upstream_check_module.git nginx-upstream-check-module
|
|
||||||
git clone https://github.com/openresty/lua-nginx-module http-lua
|
|
||||||
|
|
||||||
|
|
||||||
./configure \
|
|
||||||
--sbin-path=/usr/sbin/nginx \
|
|
||||||
--prefix=/usr/share/nginx \
|
|
||||||
--conf-path=/etc/nginx/nginx.conf \
|
|
||||||
--http-log-path=/var/log/nginx/access.log \
|
|
||||||
--error-log-path=/var/log/nginx/error.log \
|
|
||||||
--lock-path=/var/lock/nginx.lock \
|
|
||||||
--pid-path=/run/nginx.pid \
|
|
||||||
--modules-path=/usr/lib/nginx/modules \
|
|
||||||
--http-client-body-temp-path=/var/lib/nginx/body \
|
|
||||||
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
|
|
||||||
--http-proxy-temp-path=/var/lib/nginx/proxy \
|
|
||||||
--http-scgi-temp-path=/var/lib/nginx/scgi \
|
|
||||||
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
|
|
||||||
--with-cc-opt='-I/usr/local/include/luajit-2.1 -g -O2 -lz -fstack-protector-strong -Wformat -Wno-error=date-time -Wno-error=implicit-fallthrough= -Wno-error=cast-function-type -Wno-error=format-security -Wno-error=implicit-function-declaration -Wno-error=deprecated-declarations -Wno-error=unused-result -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' \
|
|
||||||
--with-ld-opt='-Wl,-z,relro -Wl,-z,now -lz -fPIC -L/usr/local/lib' \
|
|
||||||
--with-file-aio \
|
|
||||||
--with-compat \
|
|
||||||
--with-debug \
|
|
||||||
--with-threads \
|
|
||||||
--with-pcre-jit \
|
|
||||||
--with-http_ssl_module \
|
|
||||||
--with-http_stub_status_module \
|
|
||||||
--with-http_realip_module \
|
|
||||||
--with-http_auth_request_module \
|
|
||||||
--with-http_v2_module \
|
|
||||||
--with-http_dav_module \
|
|
||||||
--with-http_slice_module \
|
|
||||||
--with-http_addition_module \
|
|
||||||
--with-http_flv_module \
|
|
||||||
--with-http_geoip_module=dynamic \
|
|
||||||
--with-http_gunzip_module \
|
|
||||||
--with-http_gzip_static_module \
|
|
||||||
--with-http_image_filter_module=dynamic \
|
|
||||||
--with-http_mp4_module \
|
|
||||||
--with-http_perl_module=dynamic \
|
|
||||||
--with-http_random_index_module \
|
|
||||||
--with-http_secure_link_module \
|
|
||||||
--with-http_sub_module \
|
|
||||||
--with-http_xslt_module=dynamic \
|
|
||||||
--with-mail=dynamic \
|
|
||||||
--with-mail_ssl_module \
|
|
||||||
--with-stream=dynamic \
|
|
||||||
--with-stream_ssl_module \
|
|
||||||
--with-stream_ssl_preread_module \
|
|
||||||
--add-dynamic-module=http-headers-more-filter \
|
|
||||||
--add-dynamic-module=http-auth-pam \
|
|
||||||
--add-dynamic-module=http-dav-ext \
|
|
||||||
--add-dynamic-module=http-ndk \
|
|
||||||
--add-dynamic-module=http-echo \
|
|
||||||
--add-dynamic-module=http-fancyindex \
|
|
||||||
--add-dynamic-module=nchan \
|
|
||||||
--add-dynamic-module=http-uploadprogress \
|
|
||||||
--add-dynamic-module=http-subs-filter \
|
|
||||||
--add-dynamic-module=ssl-ct \
|
|
||||||
--add-dynamic-module=http-geoip2 \
|
|
||||||
--add-dynamic-module=spnego-http-auth-nginx-module \
|
|
||||||
--add-dynamic-module=http-auth-ldap \
|
|
||||||
--add-dynamic-module=nginx-audio-track-for-hls-module \
|
|
||||||
--add-dynamic-module=ip2location-nginx \
|
|
||||||
--add-dynamic-module=nginx-vod-module \
|
|
||||||
--add-dynamic-module=nginx-module-vts \
|
|
||||||
--add-dynamic-module=mod-zip \
|
|
||||||
--add-dynamic-module=nginx-http-user-agent \
|
|
||||||
--add-dynamic-module=nginx-unzip-module \
|
|
||||||
--add-dynamic-module=ngx-webp \
|
|
||||||
--add-dynamic-module=set-misc-nginx-module \
|
|
||||||
--add-dynamic-module=rtmp \
|
|
||||||
--add-dynamic-module=http-upstream-fair \
|
|
||||||
--add-dynamic-module=nginx-upstream-check-module \
|
|
||||||
--add-dynamic-module=http-lua
|
|
||||||
|
|
||||||
mmkir /usr/lib/nginx #workround for clean install
|
|
||||||
cat > description-pak | Custom build of Nginx with some modules, by EpicMorg.
|
|
||||||
fakeroot checkinstall -D --pakdir=/builds/export --maintainer="EpicMorg, developer@epicm.org" --pkgname=nginx-custom --install=no -y
|
|
||||||
|
|
||||||
-------------
|
|
||||||
|
|
||||||
final
|
|
||||||
apt install libzip4
|
|
||||||
extract pre.tgz
|
|
||||||
install debs
|
|
||||||
|
|
||||||
dhparam -out /etc/nginx/ssl/dhparam.pem 4096
|
|
@ -1,40 +1,200 @@
|
|||||||
FROM debian:buster
|
FROM epicmorg/devel AS builder
|
||||||
MAINTAINER Anatoliy Zimovskiy <stam@epicm.org>
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
##################################################################
|
||||||
|
# ARGuments
|
||||||
|
##################################################################
|
||||||
|
ENV BuildDocker true
|
||||||
|
ARG BUILDS_DIR=/builds
|
||||||
|
ARG SRC_DIR=${BUILDS_DIR}/src
|
||||||
|
ARG EXPORT_DIR=${BUILDS_DIR}/export
|
||||||
|
ARG PRE_DIR=${BUILDS_DIR}/pre
|
||||||
|
ARG NGINX_SRC_DIR=${SRC_DIR}/nginx
|
||||||
|
ARG NGINX_VERSION=1.17.3
|
||||||
|
ARG NGINX_DOWNLOAD_URL=http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
|
||||||
|
ARG LUAJIT_INC=/usr/local/include/luajit-2.1
|
||||||
|
ARG LUAJIT_LIB=/usr/local/lib
|
||||||
|
|
||||||
#editing sources list
|
##################################################################
|
||||||
RUN rm /etc/apt/sources.list
|
# Files and folders
|
||||||
COPY sources.list /etc/apt/sources.list
|
##################################################################
|
||||||
COPY locale.gen /etc/locale.gen
|
RUN mkdir -p ${PRE_DIR} ${NGINX_SRC_DIR} /usr/lib/nginx
|
||||||
|
ADD pre/luajit2-description-pak ${PRE_DIR}
|
||||||
|
ADD pre/nginx-description-pak ${PRE_DIR}
|
||||||
|
|
||||||
# fix errors
|
##################################################################
|
||||||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
# luaJIT 2 support for prod nginx module
|
||||||
|
##################################################################
|
||||||
|
RUN cd ${SRC_DIR} && \
|
||||||
|
git clone https://github.com/openresty/luajit2.git luajit2 && \
|
||||||
|
cp -fv ${PRE_DIR}/luajit2-description-pak ${SRC_DIR}/luajit2/description-pak && \
|
||||||
|
cd ${SRC_DIR}/luajit2 && \
|
||||||
|
make && \
|
||||||
|
make install && \
|
||||||
|
fakeroot checkinstall -D --pakdir=${EXPORT_DIR} --maintainer="EpicMorg, developer@epicm.org" --pkgname=luajit2-custom --conflicts=luajit2 --install=no -y
|
||||||
|
|
||||||
#installing utils
|
##################################################################
|
||||||
RUN apt-get update && apt-get install -y --allow-unauthenticated ca-certificates gnupg sudo apt-transport-https lsb-release apt-utils locales console-cyrillic wget curl htop mc tmux iftop cmatrix iputils-ping cmatrix-xfont lsof lynx fontconfig smbclient nano
|
# nginx preparing
|
||||||
|
##################################################################
|
||||||
|
RUN wget -qO - ${NGINX_DOWNLOAD_URL} | tar -zxv --strip-components=1 -C ${NGINX_SRC_DIR} && \
|
||||||
|
cd ${NGINX_SRC_DIR} && \
|
||||||
|
git clone https://github.com/openresty/headers-more-nginx-module.git http-headers-more-filter && \
|
||||||
|
git clone https://github.com/sto/ngx_http_auth_pam_module.git http-auth-pam && \
|
||||||
|
git clone https://github.com/arut/nginx-dav-ext-module.git http-dav-ext && \
|
||||||
|
git clone https://github.com/openresty/echo-nginx-module.git http-echo && \
|
||||||
|
git clone https://github.com/aperezdc/ngx-fancyindex.git http-fancyindex && \
|
||||||
|
git clone https://github.com/slact/nchan.git nchan && \
|
||||||
|
git clone https://github.com/masterzen/nginx-upload-progress-module.git http-uploadprogress && \
|
||||||
|
git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module http-subs-filter && \
|
||||||
|
git clone https://github.com/grahamedgecombe/nginx-ct.git ssl-ct && \
|
||||||
|
git clone https://github.com/stnoonan/spnego-http-auth-nginx-module.git spnego-http-auth-nginx-module && \
|
||||||
|
git clone https://github.com/leev/ngx_http_geoip2_module http-geoip2 && \
|
||||||
|
git clone https://github.com/flavioribeiro/nginx-audio-track-for-hls-module.git nginx-audio-track-for-hls-module && \
|
||||||
|
git clone https://github.com/chrislim2888/ip2location-nginx.git ip2location-nginx && \
|
||||||
|
git clone https://github.com/kaltura/nginx-vod-module.git nginx-vod-module && \
|
||||||
|
git clone https://github.com/vozlt/nginx-module-vts.git nginx-module-vts && \
|
||||||
|
git clone https://github.com/evanmiller/mod_zip.git mod-zip && \
|
||||||
|
git clone https://github.com/alibaba/nginx-http-user-agent.git nginx-http-user-agent && \
|
||||||
|
git clone https://github.com/youzee/nginx-unzip-module.git nginx-unzip-module && \
|
||||||
|
git clone https://github.com/vladbondarenko/ngx_webp.git ngx-webp && \
|
||||||
|
git clone https://github.com/openresty/xss-nginx-module.git xss-nginx-module && \
|
||||||
|
git clone https://github.com/openresty/set-misc-nginx-module.git set-misc-nginx-module && \
|
||||||
|
git clone https://github.com/arut/nginx-rtmp-module.git rtmp && \
|
||||||
|
git clone https://github.com/kvspb/nginx-auth-ldap.git http-auth-ldap && \
|
||||||
|
git clone https://github.com/simplresty/ngx_devel_kit.git http-ndk && \
|
||||||
|
git clone https://github.com/chrislim2888/IP2Location-C-Library.git ip2location-c-7.0.0 && \
|
||||||
|
git clone https://github.com/itoffshore/nginx-upstream-fair.git http-upstream-fair && \
|
||||||
|
git clone https://github.com/yaoweibin/nginx_upstream_check_module.git nginx-upstream-check-module && \
|
||||||
|
git clone https://github.com/openresty/lua-nginx-module http-lua
|
||||||
|
|
||||||
#installing nginx repo
|
##################################################################
|
||||||
RUN wget -O /etc/apt/trusted.gpg.d/nginx-mainline.gpg https://packages.sury.org/nginx-mainline/apt.gpg
|
# nginx compilling
|
||||||
RUN sh -c 'echo "deb https://packages.sury.org/nginx-mainline/ buster main" > /etc/apt/sources.list.d/nginx-mainline.list'
|
##################################################################
|
||||||
|
RUN cd ${NGINX_SRC_DIR} && \
|
||||||
|
./configure \
|
||||||
|
--sbin-path=/usr/sbin/nginx \
|
||||||
|
--prefix=/usr/share/nginx \
|
||||||
|
--conf-path=/etc/nginx/nginx.conf \
|
||||||
|
--http-log-path=/var/log/nginx/access.log \
|
||||||
|
--error-log-path=/var/log/nginx/error.log \
|
||||||
|
--lock-path=/var/lock/nginx.lock \
|
||||||
|
--pid-path=/run/nginx.pid \
|
||||||
|
--modules-path=/usr/lib/nginx/modules \
|
||||||
|
--http-client-body-temp-path=/var/lib/nginx/body \
|
||||||
|
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
|
||||||
|
--http-proxy-temp-path=/var/lib/nginx/proxy \
|
||||||
|
--http-scgi-temp-path=/var/lib/nginx/scgi \
|
||||||
|
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
|
||||||
|
--with-cc-opt='-I/usr/local/include/luajit-2.1 -g -O2 -lz -fstack-protector-strong -Wformat -Wno-error=date-time -Wno-error=implicit-fallthrough= -Wno-error=cast-function-type -Wno-error=format-security -Wno-error=implicit-function-declaration -Wno-error=deprecated-declarations -Wno-error=unused-result -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' \
|
||||||
|
--with-ld-opt='-Wl,-z,relro -Wl,-z,now -lz -fPIC -L/usr/local/lib' \
|
||||||
|
--with-file-aio \
|
||||||
|
--with-compat \
|
||||||
|
--with-debug \
|
||||||
|
--with-threads \
|
||||||
|
--with-pcre-jit \
|
||||||
|
--with-http_ssl_module \
|
||||||
|
--with-http_stub_status_module \
|
||||||
|
--with-http_realip_module \
|
||||||
|
--with-http_auth_request_module \
|
||||||
|
--with-http_v2_module \
|
||||||
|
--with-http_dav_module \
|
||||||
|
--with-http_slice_module \
|
||||||
|
--with-http_addition_module \
|
||||||
|
--with-http_flv_module \
|
||||||
|
--with-http_geoip_module=dynamic \
|
||||||
|
--with-http_gunzip_module \
|
||||||
|
--with-http_gzip_static_module \
|
||||||
|
--with-http_image_filter_module=dynamic \
|
||||||
|
--with-http_mp4_module \
|
||||||
|
--with-http_perl_module=dynamic \
|
||||||
|
--with-http_random_index_module \
|
||||||
|
--with-http_secure_link_module \
|
||||||
|
--with-http_sub_module \
|
||||||
|
--with-http_xslt_module=dynamic \
|
||||||
|
--with-mail=dynamic \
|
||||||
|
--with-mail_ssl_module \
|
||||||
|
--with-stream=dynamic \
|
||||||
|
--with-stream_ssl_module \
|
||||||
|
--with-stream_ssl_preread_module \
|
||||||
|
--add-dynamic-module=http-headers-more-filter \
|
||||||
|
--add-dynamic-module=http-auth-pam \
|
||||||
|
--add-dynamic-module=http-dav-ext \
|
||||||
|
--add-dynamic-module=http-ndk \
|
||||||
|
--add-dynamic-module=http-echo \
|
||||||
|
--add-dynamic-module=http-fancyindex \
|
||||||
|
--add-dynamic-module=nchan \
|
||||||
|
--add-dynamic-module=http-uploadprogress \
|
||||||
|
--add-dynamic-module=http-subs-filter \
|
||||||
|
--add-dynamic-module=ssl-ct \
|
||||||
|
--add-dynamic-module=http-geoip2 \
|
||||||
|
--add-dynamic-module=spnego-http-auth-nginx-module \
|
||||||
|
--add-dynamic-module=http-auth-ldap \
|
||||||
|
--add-dynamic-module=nginx-audio-track-for-hls-module \
|
||||||
|
--add-dynamic-module=ip2location-nginx \
|
||||||
|
--add-dynamic-module=nginx-vod-module \
|
||||||
|
--add-dynamic-module=nginx-module-vts \
|
||||||
|
--add-dynamic-module=mod-zip \
|
||||||
|
--add-dynamic-module=nginx-http-user-agent \
|
||||||
|
--add-dynamic-module=nginx-unzip-module \
|
||||||
|
--add-dynamic-module=ngx-webp \
|
||||||
|
--add-dynamic-module=set-misc-nginx-module \
|
||||||
|
--add-dynamic-module=rtmp \
|
||||||
|
--add-dynamic-module=http-upstream-fair \
|
||||||
|
--add-dynamic-module=nginx-upstream-check-module \
|
||||||
|
--add-dynamic-module=http-lua && \
|
||||||
|
cp -fv ${PRE_DIR}/nginx-description-pak ${NGINX_SRC_DIR}/description-pak && \
|
||||||
|
fakeroot checkinstall -D --pakdir=/builds/export --maintainer="EpicMorg, developer@epicm.org" --pkgname=nginx-custom --install=no -y
|
||||||
|
|
||||||
#installing packages
|
##################################################################
|
||||||
RUN apt-get update && apt-get install -y --allow-unauthenticated libgd-tools geoip-bin nginx-doc ssl-cert nginx-extras openssl libnginx-mod-http-cache-purge libnginx-mod-http-dav-ext libnginx-mod-http-geoip libnginx-mod-http-headers-more-filter libnginx-mod-http-lua libnginx-mod-http-uploadprogress libnginx-mod-mail libnginx-mod-stream libnginx-mod-http-xslt-filter
|
# cleaninig up
|
||||||
|
##################################################################
|
||||||
|
RUN apt clean -y && \
|
||||||
|
apt autoclean -y && \
|
||||||
|
rm -rfv /var/lib/apt/lists/* && \
|
||||||
|
rm -rfv /var/cache/apt/archives/*.deb
|
||||||
|
|
||||||
RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
|
##################################################################
|
||||||
ln -sf /dev/stderr /var/log/nginx/error.log
|
##################################################################
|
||||||
|
##################################################################
|
||||||
|
|
||||||
#After install fixes
|
FROM epicmorg/prod
|
||||||
RUN localedef en_US.UTF-8 -i en_US -f UTF-8
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
RUN update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
RUN apt update
|
|
||||||
RUN apt upgrade -y
|
|
||||||
RUN apt dist-upgrade -y
|
|
||||||
RUN apt-get clean autoclean
|
|
||||||
RUN apt-get autoremove -y
|
|
||||||
RUN rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
#final config
|
##################################################################
|
||||||
|
# Installing nginx from deb
|
||||||
|
##################################################################
|
||||||
|
ADD pre/ngninx.pre.tar.gz /
|
||||||
|
COPY --from=builder /builds/export /tmp/deb
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --allow-unauthenticated \
|
||||||
|
geoip-database \
|
||||||
|
geoip-bin \
|
||||||
|
libgeoip1 \
|
||||||
|
libmaxminddb0 \
|
||||||
|
libgd3 \
|
||||||
|
libxslt1.1 && \
|
||||||
|
dpkg --force-all -i /tmp/deb/*.deb && \
|
||||||
|
ln -s /usr/local/lib/libIP2Location.so /usr/lib/libIP2Location.so && \
|
||||||
|
ln -s /usr/local/lib/libIP2Location.so.1 /usr/lib/libIP2Location.so.1 && \
|
||||||
|
ln -s /usr/local/lib/libIP2Location.so /lib/libIP2Location.so && \
|
||||||
|
ln -s /usr/local/lib/libIP2Location.so.1 /lib/libIP2Location.so.1 && \
|
||||||
|
ln -sf /dev/stdout /var/log/nginx/access.log && \
|
||||||
|
ln -sf /dev/stderr /var/log/nginx/error.log && \
|
||||||
|
openssl dhparam -out /etc/nginx/dhparam.pem 4096
|
||||||
|
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# cleaninig up
|
||||||
|
##################################################################
|
||||||
|
RUN apt clean -y && \
|
||||||
|
apt autoclean -y && \
|
||||||
|
rm -rfv /var/lib/apt/lists/* && \
|
||||||
|
rm -rfv /var/cache/apt/archives/*.deb && \
|
||||||
|
rm -rfv /tmp/deb/*
|
||||||
|
|
||||||
|
#Final config
|
||||||
VOLUME ["/var/cache/nginx"]
|
VOLUME ["/var/cache/nginx"]
|
||||||
EXPOSE 80 443
|
EXPOSE 80 443
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
all: nginx
|
all: nginx
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
docker build --compress -t epicmorg/balancer .
|
docker build --compress -t epicmorg/balancer:latest .
|
||||||
|
41
balancer/legacy/Dockerfile
Normal file
41
balancer/legacy/Dockerfile
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
FROM debian:buster
|
||||||
|
MAINTAINER Anatoliy Zimovskiy <stam@epicm.org>
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
|
#editing sources list
|
||||||
|
RUN rm /etc/apt/sources.list
|
||||||
|
COPY sources.list /etc/apt/sources.list
|
||||||
|
COPY locale.gen /etc/locale.gen
|
||||||
|
|
||||||
|
# fix errors
|
||||||
|
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
||||||
|
|
||||||
|
#installing utils
|
||||||
|
RUN apt-get update && apt-get install -y --allow-unauthenticated ca-certificates gnupg sudo apt-transport-https lsb-release apt-utils locales console-cyrillic wget curl htop mc tmux iftop cmatrix iputils-ping cmatrix-xfont lsof lynx fontconfig smbclient nano
|
||||||
|
|
||||||
|
#installing nginx repo
|
||||||
|
RUN wget -O /etc/apt/trusted.gpg.d/nginx-mainline.gpg https://packages.sury.org/nginx-mainline/apt.gpg
|
||||||
|
RUN sh -c 'echo "deb https://packages.sury.org/nginx-mainline/ buster main" > /etc/apt/sources.list.d/nginx-mainline.list'
|
||||||
|
|
||||||
|
#installing packages
|
||||||
|
RUN apt-get update && apt-get install -y --allow-unauthenticated libgd-tools geoip-bin nginx-doc ssl-cert nginx-extras openssl libnginx-mod-http-cache-purge libnginx-mod-http-dav-ext libnginx-mod-http-geoip libnginx-mod-http-headers-more-filter libnginx-mod-http-lua libnginx-mod-http-uploadprogress libnginx-mod-mail libnginx-mod-stream libnginx-mod-http-xslt-filter
|
||||||
|
|
||||||
|
RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
|
||||||
|
ln -sf /dev/stderr /var/log/nginx/error.log
|
||||||
|
|
||||||
|
#After install fixes
|
||||||
|
RUN localedef en_US.UTF-8 -i en_US -f UTF-8
|
||||||
|
RUN update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
|
||||||
|
RUN apt update
|
||||||
|
RUN apt upgrade -y
|
||||||
|
RUN apt dist-upgrade -y
|
||||||
|
RUN apt-get clean autoclean
|
||||||
|
RUN apt-get autoremove -y
|
||||||
|
RUN rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
#final config
|
||||||
|
VOLUME ["/var/cache/nginx"]
|
||||||
|
EXPOSE 80 443
|
||||||
|
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
4
balancer/legacy/Makefile
Normal file
4
balancer/legacy/Makefile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
all: nginx
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
docker build --compress -t epicmorg/balancer:legacy .
|
1
balancer/php/.docker-repository.yml
Normal file
1
balancer/php/.docker-repository.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
repository: epicmorg/balancer
|
3
balancer/php/.dockerignore
Normal file
3
balancer/php/.dockerignore
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.git
|
||||||
|
scripts
|
||||||
|
.idea
|
136
balancer/php/Dockerfile
Normal file
136
balancer/php/Dockerfile
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
FROM epicmorg/balancer:latest
|
||||||
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# Installing php fpn for nginx from deb
|
||||||
|
##################################################################
|
||||||
|
RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \
|
||||||
|
sh -c 'echo "deb https://packages.sury.org/php/ buster main" > /etc/apt/sources.list.d/php.list' && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y --allow-unauthenticated \
|
||||||
|
apache2-utils \
|
||||||
|
libmemcached-dev \
|
||||||
|
sendmail \
|
||||||
|
php7.3-gmp \
|
||||||
|
php7.3-snmp \
|
||||||
|
php7.3-ldap \
|
||||||
|
php7.3-dev \
|
||||||
|
php7.3 \
|
||||||
|
php7.3-mail \
|
||||||
|
php7.3-mailparse \
|
||||||
|
php7.3-soap \
|
||||||
|
php7.3-mysql \
|
||||||
|
php7.3-memcached \
|
||||||
|
php7.3-memcache \
|
||||||
|
php7.3-igbinary \
|
||||||
|
php7.3-curl \
|
||||||
|
php7.3-gd \
|
||||||
|
php7.3-intl \
|
||||||
|
php7.3-zip \
|
||||||
|
php7.3-bcmath \
|
||||||
|
php7.3-fpm \
|
||||||
|
php-pear \
|
||||||
|
php7.3-imap \
|
||||||
|
php7.3-pspell \
|
||||||
|
php7.3-recode \
|
||||||
|
php7.3-sqlite3 \
|
||||||
|
php7.3-tidy \
|
||||||
|
php7.3-xmlrpc \
|
||||||
|
php7.3-xml \
|
||||||
|
php7.3-mbstring \
|
||||||
|
php7.3-gettext \
|
||||||
|
php7.3-apcu \
|
||||||
|
php7.3-cli \
|
||||||
|
php7.3-common \
|
||||||
|
php7.3-cgi \
|
||||||
|
php7.3-json \
|
||||||
|
php7.3-readline \
|
||||||
|
php7.3-enchant \
|
||||||
|
php7.3-ssh2 \
|
||||||
|
php7.3-oauth \
|
||||||
|
php7.3-gmagick \
|
||||||
|
php7.3-gnupg \
|
||||||
|
php7.3-redis \
|
||||||
|
php7.3-smbclient \
|
||||||
|
php7.3-yaml \
|
||||||
|
php7.3-geoip
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# Enabling php modules
|
||||||
|
##################################################################
|
||||||
|
RUN phpenmod \
|
||||||
|
snmp \
|
||||||
|
gmp \
|
||||||
|
calendar \
|
||||||
|
ldap \
|
||||||
|
curl \
|
||||||
|
exif \
|
||||||
|
ftp \
|
||||||
|
fileinfo \
|
||||||
|
gd \
|
||||||
|
geoip \
|
||||||
|
gettext \
|
||||||
|
gnupg \
|
||||||
|
iconv \
|
||||||
|
imap \
|
||||||
|
json \
|
||||||
|
mbstring \
|
||||||
|
memcached \
|
||||||
|
mysqli \
|
||||||
|
mysqlnd \
|
||||||
|
oauth \
|
||||||
|
pdo_mysql \
|
||||||
|
pdo_sqlite \
|
||||||
|
phar \
|
||||||
|
posix \
|
||||||
|
readline \
|
||||||
|
redis \
|
||||||
|
simplexml \
|
||||||
|
sockets \
|
||||||
|
sqlite3 \
|
||||||
|
ssh2 \
|
||||||
|
tokenizer \
|
||||||
|
xml \
|
||||||
|
xmlreader \
|
||||||
|
xmlrpc \
|
||||||
|
xmlwriter \
|
||||||
|
xsl \
|
||||||
|
yaml
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# ioncube support
|
||||||
|
##################################################################
|
||||||
|
ADD https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz /tmp/ioncube.tar.gz
|
||||||
|
RUN tar -C /tmp -xvf /tmp/ioncube.tar.gz && \
|
||||||
|
cp /tmp/ioncube/ioncube_loader_lin_7.3.so /usr/lib/php/20170718/ && \
|
||||||
|
echo "zend_extension = /usr/lib/php/20170718/ioncube_loader_lin_7.3.so" >> /etc/php/7.3/apache2/php.ini && \
|
||||||
|
echo "zend_extension = /usr/lib/php/20170718/ioncube_loader_lin_7.3.so" >> /etc/php/7.3/cgi/php.ini && \
|
||||||
|
echo "zend_extension = /usr/lib/php/20170718/ioncube_loader_lin_7.3.so" >> /etc/php/7.3/cli/php.ini && \
|
||||||
|
echo "zend_extension = /usr/lib/php/20170718/ioncube_loader_lin_7.3.so" >> /etc/php/7.3/fpm/php.ini && \
|
||||||
|
php -v
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# composer support
|
||||||
|
##################################################################
|
||||||
|
RUN cd /tmp && \
|
||||||
|
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
|
||||||
|
php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
|
||||||
|
rm /tmp/composer-setup.php
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# cleaninig up
|
||||||
|
##################################################################
|
||||||
|
RUN apt clean -y && \
|
||||||
|
apt autoclean -y && \
|
||||||
|
rm -rfv /var/lib/apt/lists/* && \
|
||||||
|
rm -rfv /var/cache/apt/archives/*.deb && \
|
||||||
|
rm -rfv /tmp/deb/* && \
|
||||||
|
rm -rfv /tmp/composer-setup.php && \
|
||||||
|
rm -rfv /tmp/ioncube.tar.gz
|
||||||
|
|
||||||
|
#Final config
|
||||||
|
VOLUME ["/var/cache/nginx"]
|
||||||
|
EXPOSE 80 443
|
||||||
|
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
4
balancer/php/Makefile
Normal file
4
balancer/php/Makefile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
all: nginx
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
docker build --compress -t epicmorg/balancer:php .
|
30
balancer/php/README.md
Normal file
30
balancer/php/README.md
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
balancer:
|
||||||
|
image: epicmorg/balancer
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "0.0.0.0:80:80"
|
||||||
|
- "0.0.0.0:443:443"
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
- /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- nginx:/etc/nginx
|
||||||
|
- nginx-usr:/usr/share/nginx/html
|
||||||
|
- /var/lib/nginx
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
depends_on:
|
||||||
|
- websites
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
volumes:
|
||||||
|
nginx:
|
||||||
|
external: true
|
||||||
|
nginx-usr:
|
||||||
|
external: true
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user