Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. FROM registry.exmoney.com/exmo/operations/base_images/debian9_base:latest
  2.  
  3. ENV DOCKER_CACHE_CONTROL 1
  4.  
  5. ENV DEBIAN_FRONTEND noninteractive
  6.  
  7. ENV NGINX_VERSION "1.14.2"
  8. ENV NGINX_VTS_VERSION "0.1.18"
  9.  
  10. RUN echo "deb-src http://nginx.org/packages/debian/ stretch nginx" >> /etc/apt/sources.list \
  11. && apt-get update \
  12. && apt-get install -y dpkg-dev curl nginx nginx-extras nginx-common \
  13. && mkdir -p /opt/rebuildnginx \
  14. && chmod 0777 /opt/rebuildnginx \
  15. && cd /opt/rebuildnginx \
  16. && su --preserve-environment -s /bin/bash -c "apt-get source nginx" _apt \
  17. && apt-get build-dep -y nginx=${NGINX_VERSION} \
  18. && cd /opt \
  19. && curl -sL https://github.com/vozlt/nginx-module-vts/archive/v${NGINX_VTS_VERSION}.tar.gz | tar -xz \
  20. && sed -i -r -e "s/\.\/configure(.*)/.\/configure\1 --add-module=\/opt\/nginx-module-vts-${NGINX_VTS_VERSION}/" /opt/rebuildnginx/nginx-${NGINX_VERSION}/debian/rules \
  21. && cd /opt/rebuildnginx/nginx-${NGINX_VERSION} \
  22. && dpkg-buildpackage -b \
  23. && cd /opt/rebuildnginx \
  24. && dpkg --install nginx_${NGINX_VERSION}-1~stretch_amd64.deb \
  25. && apt-get remove --purge -y dpkg-dev curl && apt-get -y --purge autoremove && rm -rf /var/lib/apt/lists/*
  26.  
  27. CMD ["nginx", "-g", "daemon off;"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement