1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- ## usage
- # build: docker build -t <registry>/<product>/<app>:<version> .
- # push : docker push <registry>/<product>/<app>:<version>
- FROM dongcj/centos7
- MAINTAINER krrish krrishdo@gmail.com
- ENV MODULE_HOME /opt/wisecloud/cdn
- ENV PACKAGE_URL "https://svicloud.s3.amazonaws.com/lslb.tar.gz"
- ENV NETTLE_URL "https://ftp.gnu.org/gnu/nettle/nettle-3.3.tar.gz"
- ## install dependice
- RUN yum -y update && \
- yum makecache fast && \
- yum -y install libtermcap-devel ncurses-devel libevent-devel && \
- yum -y install readline-devel openssl-devel postgresql-devel && \
- yum -y install pcre-devel gcc patch unzip make m4 supervisor
- ## install nettle
- RUN curl -sSL ${NETTLE_URL} | tar zxvf - -C /tmp && \
- cd /tmp/nettle-3.3 && \
- ./configure --prefix=/usr --disable-static && \
- make && \
- make install
- ## creat and enter to MODULE_HOME
- WORKDIR ${MODULE_HOME}/lslb
- ## copy app to MODULE_HOME
- RUN curl -sSL ${PACKAGE_URL} | tar zxvf - -C ${MODULE_HOME}
- ## overwrite config files
- ADD docker/*.sh /usr/local/bin/
- ADD docker/conf/ /usr/local/
- RUN chmod a+x /usr/local/bin/*.sh
- ######### Startup
- ## Port to be expose
- EXPOSE 18081
- ## command run at startup
- CMD ["start.sh"]
|