Skip to content

Commit

Permalink
Change dockerfiles centos and alpine (V.2.5.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
chamindi-a committed Sep 14, 2018
1 parent 32307b8 commit 4335c26
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
11 changes: 6 additions & 5 deletions dockerfiles/alpine/apim-analytics/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ARG FILES=./files
ARG WSO2_SERVER=wso2am-analytics
ARG WSO2_SERVER_VERSION=2.5.0
ARG WSO2_SERVER_PACK=${WSO2_SERVER}-${WSO2_SERVER_VERSION}
ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER_PACK}
# install required packages
RUN apk add --update --no-cache \
Expand Down Expand Up @@ -66,17 +67,17 @@ RUN mkdir -p ${USER_HOME}/.java/.systemPrefs && \
chown -R ${USER}:${USER_GROUP} ${USER_HOME}/.java
# copy wso2 product distribution zip files to user's home directory and set ownership
COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_PACK}/ ${USER_HOME}/${WSO2_SERVER_PACK}/
COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_PACK}/ ${WSO2_SERVER_HOME}/
# copy shared artifacts to a temporary location
COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_PACK}/repository/deployment/ ${USER_HOME}/wso2-tmp/deployment/
# copy init script to user home
COPY --chown=wso2carbon:wso2 init.sh ${USER_HOME}/
# copy mysql connector jar to the server as a third party library
COPY --chown=wso2carbon:wso2 ${FILES}/mysql-connector-java-*-bin.jar ${USER_HOME}/${WSO2_SERVER_PACK}/repository/components/lib/
COPY --chown=wso2carbon:wso2 ${FILES}/mysql-connector-java-*-bin.jar ${WSO2_SERVER_HOME}/repository/components/lib/
ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/org/xerial/snappy/snappy-java/1.1.1.7/snappy-java-1.1.1.7.jar ${USER_HOME}/${WSO2_SERVER_PACK}/repository/components/lib/
# add libraries for Kubernetes membership scheme based clustering
ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/dnsjava/dnsjava/2.1.8/dnsjava-2.1.8.jar ${USER_HOME}/${WSO2_SERVER_PACK}/repository/components/lib/
ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/org/wso2/carbon/kubernetes/artifacts/kubernetes-membership-scheme/1.0.5/kubernetes-membership-scheme-1.0.5.jar ${USER_HOME}/${WSO2_SERVER_PACK}/repository/components/dropins/
ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/dnsjava/dnsjava/2.1.8/dnsjava-2.1.8.jar ${WSO2_SERVER_HOME}/repository/components/lib/
ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/org/wso2/carbon/kubernetes/artifacts/kubernetes-membership-scheme/1.0.5/kubernetes-membership-scheme-1.0.5.jar ${WSO2_SERVER_HOME}/repository/components/dropins/
# set environment variables
ENV WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER_PACK} \
Expand All @@ -92,5 +93,5 @@ ENV WORKING_DIRECTORY=${USER_HOME}
# expose ports
EXPOSE 9764 9444 7712 7612 4041
# start the WSO2 Carbon server
# initiate container and start WSO2 Carbon server
ENTRYPOINT ${WORKING_DIRECTORY}/init.sh
14 changes: 8 additions & 6 deletions dockerfiles/centos/apim-analytics/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ARG JAVA_HOME=${USER_HOME}/java
ARG WSO2_SERVER=wso2am-analytics
ARG WSO2_SERVER_VERSION=2.5.0
ARG WSO2_SERVER_PACK=${WSO2_SERVER}-${WSO2_SERVER_VERSION}
ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER_PACK}
# install required packages
RUN yum check-update && \
Expand All @@ -56,16 +57,16 @@ RUN groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} && \
# copy the jdk and wso2 product distributions to user's home directory
COPY --chown=wso2carbon:wso2 ${FILES}/${JDK} ${USER_HOME}/java/
COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_PACK}/ ${USER_HOME}/${WSO2_SERVER_PACK}/
COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_PACK}/ ${WSO2_SERVER_HOME}/
# copy shared artifacts to a temporary location
COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_PACK}/repository/deployment/ ${USER_HOME}/wso2-tmp/deployment/
# copy init script to user home
COPY --chown=wso2carbon:wso2 init.sh ${USER_HOME}/
# copy mysql connector jar to the server as a third party library
COPY --chown=wso2carbon:wso2 ${FILES}/mysql-connector-java-*-bin.jar ${USER_HOME}/${WSO2_SERVER_PACK}/repository/components/lib/
COPY --chown=wso2carbon:wso2 ${FILES}/mysql-connector-java-*-bin.jar ${WSO2_SERVER_HOME}/repository/components/lib/
# add libraries for Kubernetes membership scheme based clustering
ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/dnsjava/dnsjava/2.1.8/dnsjava-2.1.8.jar ${USER_HOME}/${WSO2_SERVER_PACK}/repository/components/lib/
ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/org/wso2/carbon/kubernetes/artifacts/kubernetes-membership-scheme/1.0.5/kubernetes-membership-scheme-1.0.5.jar ${USER_HOME}/${WSO2_SERVER_PACK}/repository/components/dropins/
ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/dnsjava/dnsjava/2.1.8/dnsjava-2.1.8.jar ${WSO2_SERVER_HOME}/repository/components/lib/
ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/org/wso2/carbon/kubernetes/artifacts/kubernetes-membership-scheme/1.0.5/kubernetes-membership-scheme-1.0.5.jar ${WSO2_SERVER_HOME}/repository/components/dropins/
# set environment variables
ENV WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER_PACK} \
Expand All @@ -78,10 +79,11 @@ WORKDIR ${USER_HOME}
# set environment variables
ENV JAVA_HOME=${JAVA_HOME} \
PATH=$JAVA_HOME/bin:$PATH \
WSO2_SERVER_HOME=${WSO2_SERVER_HOME} \
WORKING_DIRECTORY=${USER_HOME}
# expose ports
EXPOSE 9764 9444 7712 7612 4041
# initiate container and start WSO2 Carbon Server
ENTRYPOINT ${WSO2_SERVER_HOME}/bin/wso2server.sh
# initiate container and start WSO2 Carbon server
ENTRYPOINT ${WORKING_DIRECTORY}/init.sh

0 comments on commit 4335c26

Please sign in to comment.