From 88bd01459a08f4b5a4fb338647191beb610edeb8 Mon Sep 17 00:00:00 2001 From: shariq Date: Thu, 8 Feb 2018 22:39:26 +0530 Subject: [PATCH] Fix errors in Dockerfile --- dockerfiles/apim-analytics/Dockerfile | 10 +++++----- dockerfiles/apim-analytics/README.md | 3 +-- dockerfiles/apim/Dockerfile | 6 +++--- dockerfiles/apim/README.md | 3 +-- dockerfiles/is-as-km/Dockerfile | 8 ++++---- dockerfiles/is-as-km/README.md | 3 +-- 6 files changed, 15 insertions(+), 18 deletions(-) diff --git a/dockerfiles/apim-analytics/Dockerfile b/dockerfiles/apim-analytics/Dockerfile index ca777d42..e15cc04e 100644 --- a/dockerfiles/apim-analytics/Dockerfile +++ b/dockerfiles/apim-analytics/Dockerfile @@ -29,12 +29,12 @@ ARG USER_HOME=/home/${USER} # set dependant files directory ARG FILES=./files # set jdk configurations -ARG JDK_DIST=jdk1.8.0_144 -ARG JAVA_HOME=${USER_HOME}/${JDK_DIST} +ARG JDK=jdk1.8.0* +ARG JAVA_HOME=${USER_HOME}/java # set wso2 product configurations ARG WSO2_SERVER=wso2am-analytics ARG WSO2_SERVER_VERSION=2.1.0 -ARG WSO2_SERVER_PACK=${WSO2_SERVER}-${WSO2_SERVER_VERSION} +ARG WSO2_SERVER_DIST=${WSO2_SERVER}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}-${WSO2_SERVER_VERSION} # install required packages @@ -51,8 +51,8 @@ RUN groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} && \ useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} # copy the jdk and wso2 product distributions to user's home directory -COPY --chown=wso2carbon:wso2 ${FILES}/${JDK_DIST} ${USER_HOME}/${JDK_DIST} -COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_DIST} ${USER_HOME}/${WSO2_SERVER_DIST} +COPY --chown=wso2carbon:wso2 ${FILES}/${JDK} ${USER_HOME}/java/ +COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_DIST}/ ${USER_HOME}/${WSO2_SERVER_DIST}/ # set the user and work directory USER ${USER_ID} diff --git a/dockerfiles/apim-analytics/README.md b/dockerfiles/apim-analytics/README.md index 9c5beccd..0da13cb4 100644 --- a/dockerfiles/apim-analytics/README.md +++ b/dockerfiles/apim-analytics/README.md @@ -16,10 +16,9 @@ git clone https://github.com/wso2/docker-apim.git ##### 2. Add JDK and WSO2 API Manager Analytics distributions to `/files` - Download [JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and extract that to `/files`. -- Update the JDK version number given in the ```JDK_DIST``` argument in the Dockerfile. - Download the WSO2 API Manager Analytics 2.1.0 distribution (http://wso2.com/api-management/try-it/) and extract that to `/files`.
-- Once both JDK and WSO2 API Manager distributions are extracted it may look as follows: +- Once both JDK and WSO2 API Manager distributions are extracted the folder structure should be as follows; ```bash /files/jdk/ diff --git a/dockerfiles/apim/Dockerfile b/dockerfiles/apim/Dockerfile index 334b8b45..5c07638e 100644 --- a/dockerfiles/apim/Dockerfile +++ b/dockerfiles/apim/Dockerfile @@ -29,8 +29,8 @@ ARG USER_HOME=/home/${USER} # set dependant files directory ARG FILES=./files # set jdk configurations -ARG JDK_DIST=jdk1.8.0_144 -ARG JAVA_HOME=${USER_HOME}/${JDK_DIST} +ARG JDK=jdk1.8.0* +ARG JAVA_HOME=${USER_HOME}/java # set wso2 product configurations ARG WSO2_SERVER=wso2am ARG WSO2_SERVER_VERSION=2.1.0 @@ -51,7 +51,7 @@ RUN groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} && \ useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} # copy the jdk and wso2 product distributions to user's home directory -COPY --chown=wso2carbon:wso2 ${FILES}/${JDK_DIST} ${USER_HOME}/${JDK_DIST} +COPY --chown=wso2carbon:wso2 ${FILES}/${JDK} ${USER_HOME}/java/ COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_DIST} ${USER_HOME}/${WSO2_SERVER_DIST} # set the user and work directory diff --git a/dockerfiles/apim/README.md b/dockerfiles/apim/README.md index a71ae2c8..97e058d5 100644 --- a/dockerfiles/apim/README.md +++ b/dockerfiles/apim/README.md @@ -17,10 +17,9 @@ git clone https://github.com/wso2/docker-apim.git ##### 2. Add JDK and WSO2 API Manager distributions to `/files` - Download [JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and extract that in `/files` folder. -- Update the JDK version number given in the ```JDK_DIST``` argument in the Dockerfile. - Download the WSO2 API Manager 2.1.0 distribution (http://wso2.com/api-management/try-it/) and extract that in `/files` folder. -- Once both JDK and WSO2 API Manager distributions are extracted it may look as follows: +- Once both JDK and WSO2 API Manager distributions are extracted the folder structure should be as follows; ```bash /files/jdk/ diff --git a/dockerfiles/is-as-km/Dockerfile b/dockerfiles/is-as-km/Dockerfile index f7f3d5c3..4c446e90 100644 --- a/dockerfiles/is-as-km/Dockerfile +++ b/dockerfiles/is-as-km/Dockerfile @@ -29,12 +29,12 @@ ARG USER_HOME=/home/${USER} # set dependant files directory ARG FILES=./files # set jdk configurations -ARG JDK_DIST=jdk1.8.0_144 -ARG JAVA_HOME=${USER_HOME}/${JDK_DIST} +ARG JDK=jdk1.8.0* +ARG JAVA_HOME=${USER_HOME}/java # set wso2 product configurations ARG WSO2_SERVER=wso2is-km ARG WSO2_SERVER_VERSION=5.3.0 -ARG WSO2_SERVER_PACK=${WSO2_SERVER}-${WSO2_SERVER_VERSION} +ARG WSO2_SERVER_DIST=${WSO2_SERVER}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}-${WSO2_SERVER_VERSION} # install required packages @@ -51,7 +51,7 @@ RUN groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} && \ useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} # copy the jdk and wso2 product distributions to user's home directory -COPY --chown=wso2carbon:wso2 ${FILES}/${JDK_DIST} ${USER_HOME}/${JDK_DIST} +COPY --chown=wso2carbon:wso2 ${FILES}/${JDK} ${USER_HOME}/java/ COPY --chown=wso2carbon:wso2 ${FILES}/${WSO2_SERVER_DIST} ${USER_HOME}/${WSO2_SERVER_DIST} # set the user and work directory diff --git a/dockerfiles/is-as-km/README.md b/dockerfiles/is-as-km/README.md index eccd516d..b1da2a68 100644 --- a/dockerfiles/is-as-km/README.md +++ b/dockerfiles/is-as-km/README.md @@ -16,10 +16,9 @@ git clone https://github.com/wso2/docker-apim.git ##### 2. Add JDK and WSO2 API Manager distributions to `/files` - Download [JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and extract that to `/files`. -- Update the JDK version number given in the ```JDK_DIST``` argument in the Dockerfile. - Download the WSO2 Identity Server as Key Manager 5.3.0 distribution (http://wso2.com/api-management/try-it/) and extract that to `/files`.
-- Once both JDK and WSO2 API Manager distributions are extracted it may look as follows: +- Once both JDK and WSO2 API Manager distributions are extracted the folder structure should be as follows; ```bash /files/jdk/