Dockerfile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. FROM cloudron/base:0.10.0
  2. MAINTAINER Syncthing Developers <support@cloudron.io>
  3. EXPOSE 8000
  4. RUN apt-get update && apt-get -y install busybox
  5. ENV NGINX_VERSION=1.12.0
  6. ENV NGINX_LDAP_VERSION=b80942160417e95adbadb16adc41aaa19a6a00d9
  7. # Build a custom nginx with ldap support
  8. RUN apt-get remove -y nginx-full && apt-get autoremove -y && apt-get -y install libldap2-dev libpcre3-dev
  9. RUN mkdir -p /tmp/nginx-ldap
  10. WORKDIR /tmp/nginx-ldap
  11. RUN wget "https://github.com/kvspb/nginx-auth-ldap/archive/${NGINX_LDAP_VERSION}.tar.gz" -O - \
  12. | tar -xz -C /tmp/nginx-ldap --strip-components=1
  13. RUN mkdir -p /tmp/nginx
  14. WORKDIR /tmp/nginx
  15. RUN wget "https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O - \
  16. | tar -xz -C /tmp/nginx --strip-components=1
  17. RUN ./configure \
  18. --add-dynamic-module=/tmp/nginx-ldap \
  19. --modules-path=/usr/local/nginx/modules \
  20. --conf-path=/app/code/nginx.conf \
  21. --pid-path=/run/nginx.pid \
  22. --error-log-path=/run/nginx.error.log \
  23. --build=cloudron-river
  24. RUN make install
  25. ENV VERSION 0.14.37
  26. RUN mkdir -p /app/code \
  27. && wget https://github.com/syncthing/syncthing/releases/download/v${VERSION}/syncthing-linux-amd64-v${VERSION}.tar.gz -O - \
  28. | tar -xz -C /app/code --strip-components=1
  29. WORKDIR /app/code
  30. ADD nginx.conf /app/code/nginx.conf
  31. ADD inittab /etc/inittab
  32. ADD start.sh /app/code/start.sh
  33. CMD [ "/app/code/start.sh" ]