Dockerfile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ## usage
  2. # build: docker build -t <registry>/<product>/<app>:<version> .
  3. # push : docker push <registry>/<product>/<app>:<version>
  4. FROM dongcj/centos7
  5. MAINTAINER krrish krrishdo@gmail.com
  6. ENV MODULE_HOME /opt/wisecloud/cdn
  7. ENV PACKAGE_URL "https://svicloud.s3.amazonaws.com/lslb.tar.gz"
  8. ENV NETTLE_URL "https://ftp.gnu.org/gnu/nettle/nettle-3.3.tar.gz"
  9. ## install dependice
  10. RUN yum -y update && \
  11. yum makecache fast && \
  12. yum -y install libtermcap-devel ncurses-devel libevent-devel && \
  13. yum -y install readline-devel openssl-devel postgresql-devel && \
  14. yum -y install pcre-devel gcc patch unzip make m4 supervisor
  15. ## install nettle
  16. RUN curl -sSL ${NETTLE_URL} | tar zxvf - -C /tmp && \
  17. cd /tmp/nettle-3.3 && \
  18. ./configure --prefix=/usr --disable-static && \
  19. make && \
  20. make install
  21. ## creat and enter to MODULE_HOME
  22. WORKDIR ${MODULE_HOME}/lslb
  23. ## copy app to MODULE_HOME
  24. RUN curl -sSL ${PACKAGE_URL} | tar zxvf - -C ${MODULE_HOME}
  25. ## overwrite config files
  26. ADD docker/*.sh /usr/local/bin/
  27. ADD docker/conf/ /usr/local/
  28. RUN chmod a+x /usr/local/bin/*.sh
  29. ######### Startup
  30. ## Port to be expose
  31. EXPOSE 18081
  32. ## command run at startup
  33. CMD ["start.sh"]