mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2025-01-26 13:37:57 +03:00
nginx - new build
This commit is contained in:
parent
e096e2bab3
commit
ff4ee919b0
@ -1,10 +1,11 @@
|
|||||||
FROM epicmorg/devel
|
FROM epicmorg/devel AS builder
|
||||||
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
# ARGuments
|
# ARGuments
|
||||||
##################################################################
|
##################################################################
|
||||||
|
ENV BuildDocker true
|
||||||
ARG BUILDS_DIR=/builds
|
ARG BUILDS_DIR=/builds
|
||||||
ARG SRC_DIR=${BUILDS_DIR}/src
|
ARG SRC_DIR=${BUILDS_DIR}/src
|
||||||
ARG EXPORT_DIR=${BUILDS_DIR}/export
|
ARG EXPORT_DIR=${BUILDS_DIR}/export
|
||||||
@ -18,13 +19,12 @@ ARG LUAJIT_LIB=/usr/local/lib
|
|||||||
##################################################################
|
##################################################################
|
||||||
# Files and folders
|
# Files and folders
|
||||||
##################################################################
|
##################################################################
|
||||||
RUN mkdir -p ${SRC_DIR} ${EXPORT_DIR} ${PRE_DIR} ${NGINX_SRC_DIR} /usr/lib/nginx
|
RUN mkdir -p ${PRE_DIR} ${NGINX_SRC_DIR} /usr/lib/nginx
|
||||||
ADD pre/ngninx.pre.tar.gz /
|
|
||||||
ADD pre/luajit2-description-pak ${PRE_DIR}
|
ADD pre/luajit2-description-pak ${PRE_DIR}
|
||||||
ADD pre/nginx-description-pak ${PRE_DIR}
|
ADD pre/nginx-description-pak ${PRE_DIR}
|
||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
# luaJIT 2 compilling for nginx module
|
# luaJIT 2 support for prod nginx module
|
||||||
##################################################################
|
##################################################################
|
||||||
RUN cd ${SRC_DIR} && \
|
RUN cd ${SRC_DIR} && \
|
||||||
git clone https://github.com/openresty/luajit2.git luajit2 && \
|
git clone https://github.com/openresty/luajit2.git luajit2 && \
|
||||||
@ -154,13 +154,43 @@ RUN apt clean -y && \
|
|||||||
rm -rfv /var/lib/apt/lists/* && \
|
rm -rfv /var/lib/apt/lists/* && \
|
||||||
rm -rfv /var/cache/apt/archives/*.deb
|
rm -rfv /var/cache/apt/archives/*.deb
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
##################################################################
|
||||||
|
##################################################################
|
||||||
|
|
||||||
FROM epicmorg/prod
|
FROM epicmorg/prod
|
||||||
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
COPY --from-build
|
##################################################################
|
||||||
|
# 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
|
||||||
|
|
||||||
final config
|
##################################################################
|
||||||
|
# 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
|
||||||
|
|
||||||
|
@ -2,6 +2,19 @@ FROM epicmorg/prod
|
|||||||
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# ARGuments
|
||||||
|
##################################################################
|
||||||
|
ENV BuildDocker true
|
||||||
|
ARG BUILDS_DIR=/builds
|
||||||
|
ARG SRC_DIR=${BUILDS_DIR}/src
|
||||||
|
ARG EXPORT_DIR=${BUILDS_DIR}/export
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# Files and folders
|
||||||
|
##################################################################
|
||||||
|
RUN mkdir -p ${SRC_DIR} ${EXPORT_DIR} ${PRE_DIR}
|
||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
# sid sources list
|
# sid sources list
|
||||||
##################################################################
|
##################################################################
|
||||||
@ -63,14 +76,14 @@ RUN apt-get update && \
|
|||||||
dh-make
|
dh-make
|
||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
# IP2Location support
|
# IP2Location support for prod nginx module
|
||||||
##################################################################
|
##################################################################
|
||||||
RUN cd /tmp && \
|
RUN cd ${SRC_DIR} && \
|
||||||
git clone https://github.com/chrislim2888/IP2Location-C-Library.git ip2 && \
|
git clone https://github.com/chrislim2888/IP2Location-C-Library.git ip2 && \
|
||||||
cd /tmp/ip2 && \
|
cd ${SRC_DIR}/ip2 && \
|
||||||
./build.sh && \
|
./build.sh && \
|
||||||
checkinstall --pkgversion=$(date +%Y%m%d%H%M) && \
|
fakeroot checkinstall -D --pkgversion=$(date +%Y%m%d%H%M) --pakdir=${EXPORT_DIR} --maintainer="EpicMorg, developer@epicm.org" --pkgname=ip2-custom --conflicts=ip2 --install=yes -y && \
|
||||||
rm -rfv /tmp/ip2
|
rm -rfv ${SRC_DIR}/*
|
||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
# nginx deps
|
# nginx deps
|
||||||
|
Loading…
x
Reference in New Issue
Block a user