From d8e650ab5690cf5bdcf069d9a118ef7bd40b9800 Mon Sep 17 00:00:00 2001 From: Isuru Maduranga Date: Fri, 1 Apr 2022 13:51:38 +0530 Subject: [PATCH 1/8] Add support for APIM-4.1.0 GA release in Docker artifacts --- dockerfiles/alpine/apim/Dockerfile | 4 ++-- dockerfiles/alpine/apim/README.md | 15 ++++++++------- dockerfiles/centos/apim/Dockerfile | 2 +- dockerfiles/centos/apim/README.md | 5 +++-- dockerfiles/jdk8/alpine/apim/Dockerfile | 2 +- dockerfiles/jdk8/alpine/apim/README.md | 5 +++-- dockerfiles/jdk8/centos/apim/Dockerfile | 2 +- dockerfiles/jdk8/centos/apim/README.md | 5 +++-- dockerfiles/jdk8/ubuntu/apim/Dockerfile | 10 +++++----- dockerfiles/jdk8/ubuntu/apim/README.md | 5 +++-- dockerfiles/ubuntu/apim/Dockerfile | 2 +- dockerfiles/ubuntu/apim/README.md | 5 +++-- 12 files changed, 34 insertions(+), 28 deletions(-) diff --git a/dockerfiles/alpine/apim/Dockerfile b/dockerfiles/alpine/apim/Dockerfile index 7f09e058..169c52ad 100755 --- a/dockerfiles/alpine/apim/Dockerfile +++ b/dockerfiles/alpine/apim/Dockerfile @@ -61,7 +61,7 @@ RUN echo Verifying install ... \ && echo Complete. LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.0.0.4" + com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.1.0.0" # set Docker image build arguments # build arguments for user/group configurations @@ -72,7 +72,7 @@ ARG USER_GROUP_ID=802 ARG USER_HOME=/home/${USER} # build arguments for WSO2 product installation ARG WSO2_SERVER_NAME=wso2am -ARG WSO2_SERVER_VERSION=4.0.0 +ARG WSO2_SERVER_VERSION=4.1.0 ARG WSO2_SERVER_REPOSITORY=product-apim ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} diff --git a/dockerfiles/alpine/apim/README.md b/dockerfiles/alpine/apim/README.md index b489f119..3d6cefbb 100755 --- a/dockerfiles/alpine/apim/README.md +++ b/dockerfiles/alpine/apim/README.md @@ -1,6 +1,6 @@ # Dockerfile for WSO2 API Manager # -This section defines the step-by-step instructions to build an [Alpine](https://hub.docker.com/_/alpine/) Linux based Docker image for WSO2 API Manager 4.0.0. +This section defines the step-by-step instructions to build an [Alpine](https://hub.docker.com/_/alpine/) Linux based Docker image for WSO2 API Manager 4.1.0. ## Prerequisites @@ -21,15 +21,15 @@ git clone https://github.com/wso2/docker-apim.git - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2am:4.0.0-alpine .` + + `docker build -t wso2am:4.1.0-alpine .` > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. ##### 3. Running the Docker image. -- `docker run -it -p 9443:9443 wso2am:4.0.0-alpine` +- `docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0-alpine` -> Here, only port 9443 (HTTPS servlet transport) has been mapped to a Docker host port. +> Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. You may map other container service ports, which have been exposed to Docker host ports, as desired. ##### 4. Accessing management console. @@ -46,7 +46,7 @@ As an example, steps required to change the port offset using `deployment.toml` ##### 1. Stop the API Manager container if it's already running. -In WSO2 API Manager version 4.0.0 product distribution, `deployment.toml` configuration file
+In WSO2 API Manager version 4.1.0 product distribution, `deployment.toml` configuration file
can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. @@ -61,11 +61,12 @@ chmod o+r /deployment.toml ``` docker run \ -p 9444:9444 \ +-p 8244:8244 \ --volume /deployment.toml:/deployment.toml \ -wso2am:4.0.0-alpine +wso2am:4.1.0-alpine ``` -> In here, refers to /home/wso2carbon/wso2am-4.0.0/repository/conf folder of the container. +> In here, refers to /home/wso2carbon/wso2am-4.1.0/repository/conf folder of the container. ## Docker command usage references diff --git a/dockerfiles/centos/apim/Dockerfile b/dockerfiles/centos/apim/Dockerfile index 67c942fd..88b5da39 100755 --- a/dockerfiles/centos/apim/Dockerfile +++ b/dockerfiles/centos/apim/Dockerfile @@ -76,7 +76,7 @@ ARG USER_GROUP_ID=802 ARG USER_HOME=/home/${USER} # build arguments for WSO2 product installation ARG WSO2_SERVER_NAME=wso2am -ARG WSO2_SERVER_VERSION=4.1.0-beta +ARG WSO2_SERVER_VERSION=4.1.0 ARG WSO2_SERVER_REPOSITORY=product-apim ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} diff --git a/dockerfiles/centos/apim/README.md b/dockerfiles/centos/apim/README.md index bb99d1d6..df2ce811 100755 --- a/dockerfiles/centos/apim/README.md +++ b/dockerfiles/centos/apim/README.md @@ -28,9 +28,9 @@ git clone https://github.com/wso2/docker-apim.git ##### 3. Running the Docker image. -- `docker run -it -p 9443:9443 wso2am:4.1.0-centos` +- `docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0-centos` -> Here, only port 9443 (HTTPS servlet transport) has been mapped to a Docker host port. +> Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. You may map other container service ports, which have been exposed to Docker host ports, as desired. ##### 4. Accessing management console. @@ -62,6 +62,7 @@ chmod o+r /deployment.toml ``` docker run \ -p 9444:9444 \ +-p 8244:8244 \ --volume /deployment.toml:/deployment.toml \ wso2am:4.1.0-centos ``` diff --git a/dockerfiles/jdk8/alpine/apim/Dockerfile b/dockerfiles/jdk8/alpine/apim/Dockerfile index 063037ae..81af75e0 100755 --- a/dockerfiles/jdk8/alpine/apim/Dockerfile +++ b/dockerfiles/jdk8/alpine/apim/Dockerfile @@ -101,7 +101,7 @@ ARG USER_GROUP_ID=802 ARG USER_HOME=/home/${USER} # build arguments for WSO2 product installation ARG WSO2_SERVER_NAME=wso2am -ARG WSO2_SERVER_VERSION=4.1.0-beta +ARG WSO2_SERVER_VERSION=4.1.0 ARG WSO2_SERVER_REPOSITORY=product-apim ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} diff --git a/dockerfiles/jdk8/alpine/apim/README.md b/dockerfiles/jdk8/alpine/apim/README.md index 0f74f511..b5d7c931 100755 --- a/dockerfiles/jdk8/alpine/apim/README.md +++ b/dockerfiles/jdk8/alpine/apim/README.md @@ -27,9 +27,9 @@ git clone https://github.com/wso2/docker-apim.git ##### 3. Running the Docker image. -- `docker run -it -p 9443:9443 wso2am:4.1.0-alpine-jdk8` +- `docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0-alpine-jdk8` -> Here, only port 9443 (HTTPS servlet transport) has been mapped to a Docker host port. +> Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. You may map other container service ports, which have been exposed to Docker host ports, as desired. ##### 4. Accessing management console. @@ -61,6 +61,7 @@ chmod o+r /deployment.toml ``` docker run \ -p 9444:9444 \ +-p 8244:8244 \ --volume /deployment.toml:/deployment.toml \ wso2am:4.1.0-alpine-jdk8 ``` diff --git a/dockerfiles/jdk8/centos/apim/Dockerfile b/dockerfiles/jdk8/centos/apim/Dockerfile index b6808256..4eff295a 100755 --- a/dockerfiles/jdk8/centos/apim/Dockerfile +++ b/dockerfiles/jdk8/centos/apim/Dockerfile @@ -76,7 +76,7 @@ ARG USER_GROUP_ID=802 ARG USER_HOME=/home/${USER} # build arguments for WSO2 product installation ARG WSO2_SERVER_NAME=wso2am -ARG WSO2_SERVER_VERSION=4.1.0-beta +ARG WSO2_SERVER_VERSION=4.1.0 ARG WSO2_SERVER_REPOSITORY=product-apim ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} diff --git a/dockerfiles/jdk8/centos/apim/README.md b/dockerfiles/jdk8/centos/apim/README.md index 2648ce9f..6a0d9e2c 100755 --- a/dockerfiles/jdk8/centos/apim/README.md +++ b/dockerfiles/jdk8/centos/apim/README.md @@ -28,9 +28,9 @@ git clone https://github.com/wso2/docker-apim.git ##### 3. Running the Docker image. -- `docker run -it -p 9443:9443 wso2am:4.1.0-centos-jdk8` +- `docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0-centos-jdk8` -> Here, only port 9443 (HTTPS servlet transport) has been mapped to a Docker host port. +> Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. You may map other container service ports, which have been exposed to Docker host ports, as desired. ##### 4. Accessing management console. @@ -62,6 +62,7 @@ chmod o+r /deployment.toml ``` docker run \ -p 9444:9444 \ +-p 8244:8244 \ --volume /deployment.toml:/deployment.toml \ wso2am:4.1.0-centos-jdk8 ``` diff --git a/dockerfiles/jdk8/ubuntu/apim/Dockerfile b/dockerfiles/jdk8/ubuntu/apim/Dockerfile index bac40ab2..65f01401 100755 --- a/dockerfiles/jdk8/ubuntu/apim/Dockerfile +++ b/dockerfiles/jdk8/ubuntu/apim/Dockerfile @@ -79,11 +79,11 @@ ARG USER_GROUP_ID=802 ARG USER_HOME=/home/${USER} # build arguments for WSO2 product installation ARG WSO2_SERVER_NAME=wso2am -ARG WSO2_SERVER_VERSION=4.1.0-beta +ARG WSO2_SERVER_VERSION=4.1.0 ARG WSO2_SERVER_REPOSITORY=product-apim ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} -ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_VERSION}/${WSO2_SERVER}.zip +ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_VERSION}-rc2/${WSO2_SERVER}-rc2.zip # build argument for MOTD ARG MOTD="\n\ Welcome to WSO2 Docker resources.\n\ @@ -111,15 +111,15 @@ RUN \ && rm -rf /var/lib/apt/lists/* # add the WSO2 product distribution to user's home directory RUN \ - wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ - && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ + wget -O ${WSO2_SERVER}-rc2.zip "${WSO2_SERVER_DIST_URL}" \ + && unzip -d ${USER_HOME} ${WSO2_SERVER}-rc2.zip \ && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ && mkdir ${USER_HOME}/wso2-tmp \ && bash -c 'mkdir -p ${USER_HOME}/solr/{indexed-data,database}' \ && chown wso2carbon:wso2 -R ${USER_HOME}/solr \ && cp -r ${WSO2_SERVER_HOME}/repository/deployment/server/synapse-configs ${USER_HOME}/wso2-tmp \ && cp -r ${WSO2_SERVER_HOME}/repository/deployment/server/executionplans ${USER_HOME}/wso2-tmp \ - && rm -f ${WSO2_SERVER}.zip + && rm -f ${WSO2_SERVER}-rc2.zip # set the user and work directory USER ${USER_ID} diff --git a/dockerfiles/jdk8/ubuntu/apim/README.md b/dockerfiles/jdk8/ubuntu/apim/README.md index 804cd086..496c56de 100755 --- a/dockerfiles/jdk8/ubuntu/apim/README.md +++ b/dockerfiles/jdk8/ubuntu/apim/README.md @@ -27,9 +27,9 @@ git clone https://github.com/wso2/docker-apim.git ##### 3. Running the Docker image. -- `docker run -it -p 9443:9443 wso2am:4.1.0-jdk8` +- `docker run -it -p 9443:9443 -p 8242:8243 wso2am:4.1.0-jdk8` -> Here, only port 9443 (HTTPS servlet transport) has been mapped to a Docker host port. +> Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. You may map other container service ports, which have been exposed to Docker host ports, as desired. ##### 4. Accessing management console. @@ -61,6 +61,7 @@ chmod o+r /deployment.toml ``` docker run \ -p 9444:9444 \ +-p 8244:8244 \ --volume /deployment.toml:/deployment.toml \ wso2am:4.1.0-jdk8 ``` diff --git a/dockerfiles/ubuntu/apim/Dockerfile b/dockerfiles/ubuntu/apim/Dockerfile index ace26550..a34bc345 100755 --- a/dockerfiles/ubuntu/apim/Dockerfile +++ b/dockerfiles/ubuntu/apim/Dockerfile @@ -87,7 +87,7 @@ ARG USER_GROUP_ID=802 ARG USER_HOME=/home/${USER} # build arguments for WSO2 product installation ARG WSO2_SERVER_NAME=wso2am -ARG WSO2_SERVER_VERSION=4.1.0-beta +ARG WSO2_SERVER_VERSION=4.1.0 ARG WSO2_SERVER_REPOSITORY=product-apim ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} diff --git a/dockerfiles/ubuntu/apim/README.md b/dockerfiles/ubuntu/apim/README.md index 7f1118bc..4fe7d667 100755 --- a/dockerfiles/ubuntu/apim/README.md +++ b/dockerfiles/ubuntu/apim/README.md @@ -27,9 +27,9 @@ git clone https://github.com/wso2/docker-apim.git ##### 3. Running the Docker image. -- `docker run -it -p 9443:9443 wso2am:4.1.0` +- `docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0` -> Here, only port 9443 (HTTPS servlet transport) has been mapped to a Docker host port. +> Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. You may map other container service ports, which have been exposed to Docker host ports, as desired. ##### 4. Accessing management console. @@ -61,6 +61,7 @@ chmod o+r /deployment.toml ``` docker run \ -p 9444:9444 \ +-p 8244:8244 \ --volume /deployment.toml:/deployment.toml \ wso2am:4.1.0 ``` From 17d868d287086cc9f1f32eff2a6189c3318cc821 Mon Sep 17 00:00:00 2001 From: Isuru Maduranga Date: Fri, 1 Apr 2022 15:36:58 +0530 Subject: [PATCH 2/8] Add correct docker tag --- dockerfiles/alpine/apim/Dockerfile | 2 +- dockerfiles/centos/apim/Dockerfile | 2 +- dockerfiles/jdk8/alpine/apim/Dockerfile | 2 +- dockerfiles/jdk8/centos/apim/Dockerfile | 2 +- dockerfiles/jdk8/ubuntu/apim/Dockerfile | 10 +++++----- dockerfiles/ubuntu/apim/Dockerfile | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dockerfiles/alpine/apim/Dockerfile b/dockerfiles/alpine/apim/Dockerfile index 169c52ad..20d2178f 100755 --- a/dockerfiles/alpine/apim/Dockerfile +++ b/dockerfiles/alpine/apim/Dockerfile @@ -61,7 +61,7 @@ RUN echo Verifying install ... \ && echo Complete. LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.1.0.0" + com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.1.0.1" # set Docker image build arguments # build arguments for user/group configurations diff --git a/dockerfiles/centos/apim/Dockerfile b/dockerfiles/centos/apim/Dockerfile index 88b5da39..cd79b8e0 100755 --- a/dockerfiles/centos/apim/Dockerfile +++ b/dockerfiles/centos/apim/Dockerfile @@ -65,7 +65,7 @@ RUN echo Verifying install ... \ && echo Complete. LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.1.0.0" + com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.1.0.1" # set Docker image build arguments # build arguments for user/group configurations diff --git a/dockerfiles/jdk8/alpine/apim/Dockerfile b/dockerfiles/jdk8/alpine/apim/Dockerfile index 81af75e0..e9c4f4ec 100755 --- a/dockerfiles/jdk8/alpine/apim/Dockerfile +++ b/dockerfiles/jdk8/alpine/apim/Dockerfile @@ -90,7 +90,7 @@ RUN echo Verifying install ... \ && echo Complete. LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.1.0.0" + com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.1.0.1" # set Docker image build arguments # build arguments for user/group configurations diff --git a/dockerfiles/jdk8/centos/apim/Dockerfile b/dockerfiles/jdk8/centos/apim/Dockerfile index 4eff295a..c091c8bf 100755 --- a/dockerfiles/jdk8/centos/apim/Dockerfile +++ b/dockerfiles/jdk8/centos/apim/Dockerfile @@ -65,7 +65,7 @@ RUN echo Verifying install ... \ && echo Complete. LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.1.0.0" + com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.1.0.1" # set Docker image build arguments # build arguments for user/group configurations diff --git a/dockerfiles/jdk8/ubuntu/apim/Dockerfile b/dockerfiles/jdk8/ubuntu/apim/Dockerfile index 65f01401..fb779504 100755 --- a/dockerfiles/jdk8/ubuntu/apim/Dockerfile +++ b/dockerfiles/jdk8/ubuntu/apim/Dockerfile @@ -68,7 +68,7 @@ RUN echo Verifying install ... \ && echo Complete. LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.1.0.0" + com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.1.0.1" # set Docker image build arguments # build arguments for user/group configurations @@ -83,7 +83,7 @@ ARG WSO2_SERVER_VERSION=4.1.0 ARG WSO2_SERVER_REPOSITORY=product-apim ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} -ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_VERSION}-rc2/${WSO2_SERVER}-rc2.zip +ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_VERSION}/${WSO2_SERVER}.zip # build argument for MOTD ARG MOTD="\n\ Welcome to WSO2 Docker resources.\n\ @@ -111,15 +111,15 @@ RUN \ && rm -rf /var/lib/apt/lists/* # add the WSO2 product distribution to user's home directory RUN \ - wget -O ${WSO2_SERVER}-rc2.zip "${WSO2_SERVER_DIST_URL}" \ - && unzip -d ${USER_HOME} ${WSO2_SERVER}-rc2.zip \ + wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ + && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ && mkdir ${USER_HOME}/wso2-tmp \ && bash -c 'mkdir -p ${USER_HOME}/solr/{indexed-data,database}' \ && chown wso2carbon:wso2 -R ${USER_HOME}/solr \ && cp -r ${WSO2_SERVER_HOME}/repository/deployment/server/synapse-configs ${USER_HOME}/wso2-tmp \ && cp -r ${WSO2_SERVER_HOME}/repository/deployment/server/executionplans ${USER_HOME}/wso2-tmp \ - && rm -f ${WSO2_SERVER}-rc2.zip + && rm -f ${WSO2_SERVER}.zip # set the user and work directory USER ${USER_ID} diff --git a/dockerfiles/ubuntu/apim/Dockerfile b/dockerfiles/ubuntu/apim/Dockerfile index a34bc345..9f3a67a8 100755 --- a/dockerfiles/ubuntu/apim/Dockerfile +++ b/dockerfiles/ubuntu/apim/Dockerfile @@ -76,7 +76,7 @@ RUN echo Verifying install ... \ && echo Complete. LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.1.0.0" + com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.1.0.1" # set Docker image build arguments # build arguments for user/group configurations From 029b899a0cb39db35d5b0698e56050234aded5d4 Mon Sep 17 00:00:00 2001 From: Isuru Maduranga Date: Mon, 4 Apr 2022 00:07:56 +0530 Subject: [PATCH 3/8] Add instructions to build multiarch images --- dockerfiles/ubuntu/apim/README.md | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/dockerfiles/ubuntu/apim/README.md b/dockerfiles/ubuntu/apim/README.md index 4fe7d667..e099d7b7 100755 --- a/dockerfiles/ubuntu/apim/README.md +++ b/dockerfiles/ubuntu/apim/README.md @@ -68,8 +68,43 @@ wso2am:4.1.0 > In here, refers to /home/wso2carbon/wso2am-4.1.0/repository/conf folder of the container. +## How to build a Docker image with multi architecture support + +The above wso2am:4.1.0 image will only be supported for the CPU architecture of your current machine. Docker buildx plugin can be used to build wso2am:4.1.0 image to support any CPU architecture. + +#### 1. Install [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) + +#### 2. Install [QEMU Emulators](https://github.com/tonistiigi/binfmt) +``` +docker run -it --rm --privileged tonistiigi/binfmt --install all +``` + +#### 3. Create, switch and inspect a new builder +``` +docker buildx create --name wso2ambuilder +``` +``` +docker buildx use wso2ambuilder +``` +``` +docker buildx inspect --bootstrap +``` +#### 4. Build and push + +``` +docker buildx build --platform linux/amd64,linux/arm64 -t /wso2am:4.1.0-multiarch --push . +``` + +> - Here is a valid Docker or Dockerhub username. +> - Use command "docker login" to authenticate first if it fails to push. +> - You can specify any number of platforms to support --platform flag +> - Use command "docker buildx ls" to see list of existing builders and supported platforms. +> - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only + ## Docker command usage references * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) * [Docker run command reference](https://docs.docker.com/engine/reference/run/) * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) +* [Docker multi architecture build reference](https://docs.docker.com/desktop/multi-arch/) +* [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) From 02c575ed3236bdfbef3b1f3a5e8ad5c14a846df1 Mon Sep 17 00:00:00 2001 From: Isuru Maduranga Date: Mon, 4 Apr 2022 00:55:06 +0530 Subject: [PATCH 4/8] Add instructions to run official wso2am images --- dockerfiles/alpine/apim/README.md | 10 ++++++++++ dockerfiles/centos/apim/README.md | 9 +++++++++ dockerfiles/ubuntu/apim/README.md | 14 ++++++++++++++ 3 files changed, 33 insertions(+) diff --git a/dockerfiles/alpine/apim/README.md b/dockerfiles/alpine/apim/README.md index 3d6cefbb..adba4ae6 100755 --- a/dockerfiles/alpine/apim/README.md +++ b/dockerfiles/alpine/apim/README.md @@ -68,6 +68,16 @@ wso2am:4.1.0-alpine > In here, refers to /home/wso2carbon/wso2am-4.1.0/repository/conf folder of the container. +## Running official wso2am image +It is possible to use official wso2am images without building them from the scratch. + +- To run on amd64 +``` +docker run -it -p 9443:9443 -p 8243:8243 wso2/wso2am:4.1.0-alpine +``` +> This image is only supported for amd64. + + ## Docker command usage references * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) diff --git a/dockerfiles/centos/apim/README.md b/dockerfiles/centos/apim/README.md index df2ce811..1bff53cf 100755 --- a/dockerfiles/centos/apim/README.md +++ b/dockerfiles/centos/apim/README.md @@ -69,6 +69,15 @@ wso2am:4.1.0-centos > In here, refers to /home/wso2carbon/wso2am-4.1.0/repository/conf folder of the container. +## Running official Ubuntu wso2am images +It is possible to use official wso2am images without building them from the scratch. + +- To run on amd64 or Apple Silicon (arm64) +``` +docker run -it -p 9443:9443 -p 8243:8243 wso2/wso2am:4.1.0-centos +``` +> This official image is built for amd64 thus it will not run on Apple silicon natively. But it will run on emulated docker on Rosetta. + ## Docker command usage references * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) diff --git a/dockerfiles/ubuntu/apim/README.md b/dockerfiles/ubuntu/apim/README.md index e099d7b7..e605280f 100755 --- a/dockerfiles/ubuntu/apim/README.md +++ b/dockerfiles/ubuntu/apim/README.md @@ -101,6 +101,20 @@ docker buildx build --platform linux/amd64,linux/arm64 -t /wso2 > - Use command "docker buildx ls" to see list of existing builders and supported platforms. > - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only +## Running official wso2am images +It is possible to use official wso2am images without building them from the scratch. + +- To run on amd64 +``` +docker run -it -p 9443:9443 -p 8243:8243 wso2/wso2am:latest +``` + +- To run on native Apple Silicon ( arm64 ) +``` +docker run -it -p 9443:9443 -p 8243:8243 wso2/wso2am:4.1.0-multiarch +``` + + ## Docker command usage references * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) From 3966fa363d0f4ed1948cf0008b9108a5a8cc333e Mon Sep 17 00:00:00 2001 From: Isuru Maduranga Date: Mon, 4 Apr 2022 01:40:47 +0530 Subject: [PATCH 5/8] Add instructions to build wso2am:4.1.0-alpine image on Apple Silicon --- dockerfiles/alpine/apim/README.md | 8 ++++++++ dockerfiles/jdk8/alpine/apim/README.md | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/dockerfiles/alpine/apim/README.md b/dockerfiles/alpine/apim/README.md index adba4ae6..b6a6d361 100755 --- a/dockerfiles/alpine/apim/README.md +++ b/dockerfiles/alpine/apim/README.md @@ -19,12 +19,20 @@ git clone https://github.com/wso2/docker-apim.git ##### 2. Build the Docker image. + + - Navigate to `` directory.
Execute `docker build` command as shown below. + `docker build -t wso2am:4.1.0-alpine .` > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. +> Note:- wso2am:4.1.0-alpine image can only be built on amd64(x86_64). It is not supported to be built or run natively on Apple silicon. But it is possible to build an amd64 image using [Docker buildx](https://docs.docker.com/desktop/multi-arch/) and then run via emulation on rosetta. Use following command. + +``` +docker buildx build --platform linux/amd64 -t wso2am:4.1.0-alpine . +``` + ##### 3. Running the Docker image. - `docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0-alpine` diff --git a/dockerfiles/jdk8/alpine/apim/README.md b/dockerfiles/jdk8/alpine/apim/README.md index b5d7c931..63af0c32 100755 --- a/dockerfiles/jdk8/alpine/apim/README.md +++ b/dockerfiles/jdk8/alpine/apim/README.md @@ -25,6 +25,12 @@ git clone https://github.com/wso2/docker-apim.git > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. +> Note:- wso2am:4.1.0-alpine-jdk8 image can only be built on amd64(x86_64). It is not supported to be built or run natively on Apple silicon. But it is possible to build an amd64 image using [Docker buildx](https://docs.docker.com/desktop/multi-arch/) and then run via emulation on rosetta. Use following command. + +``` +docker buildx build --platform linux/amd64 -t wso2am:4.1.0-alpine-jdk8 . +``` + ##### 3. Running the Docker image. - `docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0-alpine-jdk8` From d96197de4be804beb90fbf7bff05dc4866082cf2 Mon Sep 17 00:00:00 2001 From: Isuru Maduranga Date: Mon, 4 Apr 2022 01:54:05 +0530 Subject: [PATCH 6/8] Add instructions to build multiarch centos images --- dockerfiles/alpine/apim/README.md | 1 + dockerfiles/centos/apim/README.md | 35 ++++++++++++++++++++++++++ dockerfiles/jdk8/alpine/apim/README.md | 1 + dockerfiles/jdk8/centos/apim/README.md | 35 ++++++++++++++++++++++++++ dockerfiles/jdk8/ubuntu/apim/README.md | 35 ++++++++++++++++++++++++++ 5 files changed, 107 insertions(+) diff --git a/dockerfiles/alpine/apim/README.md b/dockerfiles/alpine/apim/README.md index b6a6d361..1516c537 100755 --- a/dockerfiles/alpine/apim/README.md +++ b/dockerfiles/alpine/apim/README.md @@ -91,3 +91,4 @@ docker run -it -p 9443:9443 -p 8243:8243 wso2/wso2am:4.1.0-alpine * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) * [Docker run command reference](https://docs.docker.com/engine/reference/run/) * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) +* [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) diff --git a/dockerfiles/centos/apim/README.md b/dockerfiles/centos/apim/README.md index 1bff53cf..282a6411 100755 --- a/dockerfiles/centos/apim/README.md +++ b/dockerfiles/centos/apim/README.md @@ -78,8 +78,43 @@ docker run -it -p 9443:9443 -p 8243:8243 wso2/wso2am:4.1.0-centos ``` > This official image is built for amd64 thus it will not run on Apple silicon natively. But it will run on emulated docker on Rosetta. +## How to build a Docker image with multi architecture support + +The above wso2am:4.1.0 image will only be supported for the CPU architecture of your current machine. Docker buildx plugin can be used to build wso2am:4.1.0 image to support any CPU architecture. + +#### 1. Install [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) + +#### 2. Install [QEMU Emulators](https://github.com/tonistiigi/binfmt) +``` +docker run -it --rm --privileged tonistiigi/binfmt --install all +``` + +#### 3. Create, switch and inspect a new builder +``` +docker buildx create --name wso2ambuilder +``` +``` +docker buildx use wso2ambuilder +``` +``` +docker buildx inspect --bootstrap +``` +#### 4. Build and push + +``` +docker buildx build --platform linux/amd64,linux/arm64 -t /wso2am:4.1.0-centos-multiarch --push . +``` + +> - Here is a valid Docker or Dockerhub username. +> - Use command "docker login" to authenticate first if it fails to push. +> - You can specify any number of platforms to support --platform flag +> - Use command "docker buildx ls" to see list of existing builders and supported platforms. +> - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only + ## Docker command usage references * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) * [Docker run command reference](https://docs.docker.com/engine/reference/run/) * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) +* [Docker multi architecture build reference](https://docs.docker.com/desktop/multi-arch/) +* [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) diff --git a/dockerfiles/jdk8/alpine/apim/README.md b/dockerfiles/jdk8/alpine/apim/README.md index 63af0c32..a66777d6 100755 --- a/dockerfiles/jdk8/alpine/apim/README.md +++ b/dockerfiles/jdk8/alpine/apim/README.md @@ -79,3 +79,4 @@ wso2am:4.1.0-alpine-jdk8 * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) * [Docker run command reference](https://docs.docker.com/engine/reference/run/) * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) +* [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) \ No newline at end of file diff --git a/dockerfiles/jdk8/centos/apim/README.md b/dockerfiles/jdk8/centos/apim/README.md index 6a0d9e2c..0c229adc 100755 --- a/dockerfiles/jdk8/centos/apim/README.md +++ b/dockerfiles/jdk8/centos/apim/README.md @@ -69,8 +69,43 @@ wso2am:4.1.0-centos-jdk8 > In here, refers to /home/wso2carbon/wso2am-4.1.0/repository/conf folder of the container. +## How to build a Docker image with multi architecture support + +The above wso2am:4.1.0-centos-jdk8 image will only be supported for the CPU architecture of your current machine. Docker buildx plugin can be used to build wso2am:4.1.0-centos-jdk8 image to support any CPU architecture. + +#### 1. Install [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) + +#### 2. Install [QEMU Emulators](https://github.com/tonistiigi/binfmt) +``` +docker run -it --rm --privileged tonistiigi/binfmt --install all +``` + +#### 3. Create, switch and inspect a new builder +``` +docker buildx create --name wso2ambuilder +``` +``` +docker buildx use wso2ambuilder +``` +``` +docker buildx inspect --bootstrap +``` +#### 4. Build and push + +``` +docker buildx build --platform linux/amd64,linux/arm64 -t /wso2am:4.1.0-centos-jdk8-multiarch --push . +``` + +> - Here is a valid Docker or Dockerhub username. +> - Use command "docker login" to authenticate first if it fails to push. +> - You can specify any number of platforms to support --platform flag +> - Use command "docker buildx ls" to see list of existing builders and supported platforms. +> - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only + ## Docker command usage references * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) * [Docker run command reference](https://docs.docker.com/engine/reference/run/) * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) +* [Docker multi architecture build reference](https://docs.docker.com/desktop/multi-arch/) +* [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) diff --git a/dockerfiles/jdk8/ubuntu/apim/README.md b/dockerfiles/jdk8/ubuntu/apim/README.md index 496c56de..e0bd27e3 100755 --- a/dockerfiles/jdk8/ubuntu/apim/README.md +++ b/dockerfiles/jdk8/ubuntu/apim/README.md @@ -68,8 +68,43 @@ wso2am:4.1.0-jdk8 > In here, refers to /home/wso2carbon/wso2am-4.1.0/repository/conf folder of the container. +## How to build a Docker image with multi architecture support + +The above wso2am:4.1.0-jdk8 image will only be supported for the CPU architecture of your current machine. Docker buildx plugin can be used to build wso2am:4.1.0-jdk8 image to support any CPU architecture. + +#### 1. Install [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) + +#### 2. Install [QEMU Emulators](https://github.com/tonistiigi/binfmt) +``` +docker run -it --rm --privileged tonistiigi/binfmt --install all +``` + +#### 3. Create, switch and inspect a new builder +``` +docker buildx create --name wso2ambuilder +``` +``` +docker buildx use wso2ambuilder +``` +``` +docker buildx inspect --bootstrap +``` +#### 4. Build and push + +``` +docker buildx build --platform linux/amd64,linux/arm64 -t /wso2am:4.1.0-jdk8-multiarch --push . +``` + +> - Here is a valid Docker or Dockerhub username. +> - Use command "docker login" to authenticate first if it fails to push. +> - You can specify any number of platforms to support --platform flag +> - Use command "docker buildx ls" to see list of existing builders and supported platforms. +> - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only + ## Docker command usage references * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) * [Docker run command reference](https://docs.docker.com/engine/reference/run/) * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) +* [Docker multi architecture build reference](https://docs.docker.com/desktop/multi-arch/) +* [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) From e9941c14e52c2af9f57047150c9ba413d54c4439 Mon Sep 17 00:00:00 2001 From: Isuru Maduranga Date: Mon, 4 Apr 2022 02:07:31 +0530 Subject: [PATCH 7/8] Improve formatting of README files --- dockerfiles/alpine/apim/README.md | 23 ++++++++++++++--------- dockerfiles/centos/apim/README.md | 23 ++++++++++++++--------- dockerfiles/jdk8/alpine/apim/README.md | 22 +++++++++++++--------- dockerfiles/jdk8/centos/apim/README.md | 22 +++++++++++++--------- dockerfiles/jdk8/ubuntu/apim/README.md | 22 +++++++++++++--------- dockerfiles/ubuntu/apim/README.md | 22 +++++++++++++--------- 6 files changed, 80 insertions(+), 54 deletions(-) diff --git a/dockerfiles/alpine/apim/README.md b/dockerfiles/alpine/apim/README.md index 1516c537..533a4488 100755 --- a/dockerfiles/alpine/apim/README.md +++ b/dockerfiles/alpine/apim/README.md @@ -9,7 +9,7 @@ This section defines the step-by-step instructions to build an [Alpine](https:// ## How to build an image and run -##### 1. Checkout this repository into your local machine using the following Git client command. +#### 1. Checkout this repository into your local machine using the following Git client command. ``` git clone https://github.com/wso2/docker-apim.git @@ -17,13 +17,16 @@ git clone https://github.com/wso2/docker-apim.git > The local copy of the `dockerfiles/alpine/apim` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. -##### 2. Build the Docker image. +#### 2. Build the Docker image. - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2am:4.1.0-alpine .` + +``` +docker build -t wso2am:4.1.0-alpine . +``` > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. @@ -33,14 +36,16 @@ git clone https://github.com/wso2/docker-apim.git docker buildx build --platform linux/amd64 -t wso2am:4.1.0-alpine . ``` -##### 3. Running the Docker image. +#### 3. Running the Docker image. -- `docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0-alpine` +``` +docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0-alpine +``` > Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. You may map other container service ports, which have been exposed to Docker host ports, as desired. -##### 4. Accessing management console. +#### 4. Accessing management console. - To access the management console, use the docker host IP and port 9443. + `https://:9443/carbon` @@ -52,19 +57,19 @@ You may map other container service ports, which have been exposed to Docker hos Configurations would lie on the Docker host machine and they can be volume mounted to the container.
As an example, steps required to change the port offset using `deployment.toml` is as follows: -##### 1. Stop the API Manager container if it's already running. +#### 1. Stop the API Manager container if it's already running. In WSO2 API Manager version 4.1.0 product distribution, `deployment.toml` configuration file
can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. -##### 2. Grant read permission to `other` users for `/deployment.toml`. +#### 2. Grant read permission to `other` users for `/deployment.toml`. ``` chmod o+r /deployment.toml ``` -##### 3. Run the image by mounting the file to container as follows: +#### 3. Run the image by mounting the file to container as follows: ``` docker run \ diff --git a/dockerfiles/centos/apim/README.md b/dockerfiles/centos/apim/README.md index 282a6411..45283f65 100755 --- a/dockerfiles/centos/apim/README.md +++ b/dockerfiles/centos/apim/README.md @@ -10,7 +10,7 @@ This section defines the step-by-step instructions to build an [CentOS](https:// ## How to build an image and run -##### 1. Checkout this repository into your local machine using the following Git client command. +#### 1. Checkout this repository into your local machine using the following Git client command. ``` git clone https://github.com/wso2/docker-apim.git @@ -18,22 +18,27 @@ git clone https://github.com/wso2/docker-apim.git > The local copy of the `dockerfiles/centos/apim` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. -##### 2. Build the Docker image. +#### 2. Build the Docker image. - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2am:4.1.0-centos .` + +``` +docker build -t wso2am:4.1.0-centos . +``` > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. -##### 3. Running the Docker image. +#### 3. Running the Docker image. -- `docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0-centos` +``` +docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0-centos +``` > Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. You may map other container service ports, which have been exposed to Docker host ports, as desired. -##### 4. Accessing management console. +#### 4. Accessing management console. - To access the management console, use the docker host IP and port 9443. + `https://:9443/carbon` @@ -45,19 +50,19 @@ You may map other container service ports, which have been exposed to Docker hos Configurations would lie on the Docker host machine and they can be volume mounted to the container.
As an example, steps required to change the port offset using `deployment.toml` is as follows: -##### 1. Stop the API Manager container if it's already running. +#### 1. Stop the API Manager container if it's already running. In WSO2 API Manager version 4.1.0 product distribution, `deployment.toml` configuration file
can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. -##### 2. Grant read permission to `other` users for `/deployment.toml`. +#### 2. Grant read permission to `other` users for `/deployment.toml`. ``` chmod o+r /deployment.toml ``` -##### 3. Run the image by mounting the file to container as follows: +#### 3. Run the image by mounting the file to container as follows: ``` docker run \ diff --git a/dockerfiles/jdk8/alpine/apim/README.md b/dockerfiles/jdk8/alpine/apim/README.md index a66777d6..267c6072 100755 --- a/dockerfiles/jdk8/alpine/apim/README.md +++ b/dockerfiles/jdk8/alpine/apim/README.md @@ -9,7 +9,7 @@ This section defines the step-by-step instructions to build an [Alpine](https:// ## How to build an image and run -##### 1. Checkout this repository into your local machine using the following Git client command. +#### 1. Checkout this repository into your local machine using the following Git client command. ``` git clone https://github.com/wso2/docker-apim.git @@ -17,11 +17,13 @@ git clone https://github.com/wso2/docker-apim.git > The local copy of the `dockerfiles/alpine/apim` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. -##### 2. Build the Docker image. +#### 2. Build the Docker image. - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2am:4.1.0-alpine-jdk8 .` +``` +docker build -t wso2am:4.1.0-alpine-jdk8 . +``` > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. @@ -31,14 +33,16 @@ git clone https://github.com/wso2/docker-apim.git docker buildx build --platform linux/amd64 -t wso2am:4.1.0-alpine-jdk8 . ``` -##### 3. Running the Docker image. +#### 3. Running the Docker image. -- `docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0-alpine-jdk8` +``` +docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0-alpine-jdk8 +``` > Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. You may map other container service ports, which have been exposed to Docker host ports, as desired. -##### 4. Accessing management console. +#### 4. Accessing management console. - To access the management console, use the docker host IP and port 9443. + `https://:9443/carbon` @@ -50,19 +54,19 @@ You may map other container service ports, which have been exposed to Docker hos Configurations would lie on the Docker host machine and they can be volume mounted to the container.
As an example, steps required to change the port offset using `deployment.toml` is as follows: -##### 1. Stop the API Manager container if it's already running. +#### 1. Stop the API Manager container if it's already running. In WSO2 API Manager version 4.1.0 product distribution, `deployment.toml` configuration file
can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. -##### 2. Grant read permission to `other` users for `/deployment.toml`. +#### 2. Grant read permission to `other` users for `/deployment.toml`. ``` chmod o+r /deployment.toml ``` -##### 3. Run the image by mounting the file to container as follows: +#### 3. Run the image by mounting the file to container as follows: ``` docker run \ diff --git a/dockerfiles/jdk8/centos/apim/README.md b/dockerfiles/jdk8/centos/apim/README.md index 0c229adc..3113f02e 100755 --- a/dockerfiles/jdk8/centos/apim/README.md +++ b/dockerfiles/jdk8/centos/apim/README.md @@ -10,7 +10,7 @@ This section defines the step-by-step instructions to build an [CentOS](https:// ## How to build an image and run -##### 1. Checkout this repository into your local machine using the following Git client command. +#### 1. Checkout this repository into your local machine using the following Git client command. ``` git clone https://github.com/wso2/docker-apim.git @@ -18,22 +18,26 @@ git clone https://github.com/wso2/docker-apim.git > The local copy of the `dockerfiles/centos/apim` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. -##### 2. Build the Docker image. +#### 2. Build the Docker image. - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2am:4.1.0-centos-jdk8 .` +``` +docker build -t wso2am:4.1.0-centos-jdk8 . +``` > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. -##### 3. Running the Docker image. +#### 3. Running the Docker image. -- `docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0-centos-jdk8` +``` +docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0-centos-jdk8 +``` > Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. You may map other container service ports, which have been exposed to Docker host ports, as desired. -##### 4. Accessing management console. +#### 4. Accessing management console. - To access the management console, use the docker host IP and port 9443. + `https://:9443/carbon` @@ -45,19 +49,19 @@ You may map other container service ports, which have been exposed to Docker hos Configurations would lie on the Docker host machine and they can be volume mounted to the container.
As an example, steps required to change the port offset using `deployment.toml` is as follows: -##### 1. Stop the API Manager container if it's already running. +#### 1. Stop the API Manager container if it's already running. In WSO2 API Manager version 4.1.0 product distribution, `deployment.toml` configuration file
can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. -##### 2. Grant read permission to `other` users for `/deployment.toml`. +#### 2. Grant read permission to `other` users for `/deployment.toml`. ``` chmod o+r /deployment.toml ``` -##### 3. Run the image by mounting the file to container as follows: +#### 3. Run the image by mounting the file to container as follows: ``` docker run \ diff --git a/dockerfiles/jdk8/ubuntu/apim/README.md b/dockerfiles/jdk8/ubuntu/apim/README.md index e0bd27e3..f501bc71 100755 --- a/dockerfiles/jdk8/ubuntu/apim/README.md +++ b/dockerfiles/jdk8/ubuntu/apim/README.md @@ -9,7 +9,7 @@ This section defines the step-by-step instructions to build an [Ubuntu](https:// ## How to build an image and run -##### 1. Checkout this repository into your local machine using the following Git client command. +#### 1. Checkout this repository into your local machine using the following Git client command. ``` git clone https://github.com/wso2/docker-apim.git @@ -17,22 +17,26 @@ git clone https://github.com/wso2/docker-apim.git > The local copy of the `dockerfiles/ubuntu/apim` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. -##### 2. Build the Docker image. +#### 2. Build the Docker image. - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2am:4.1.0-jdk8 .` +``` +docker build -t wso2am:4.1.0-jdk8 . +``` > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. -##### 3. Running the Docker image. +#### 3. Running the Docker image. -- `docker run -it -p 9443:9443 -p 8242:8243 wso2am:4.1.0-jdk8` +``` +docker run -it -p 9443:9443 -p 8242:8243 wso2am:4.1.0-jdk8 +``` > Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. You may map other container service ports, which have been exposed to Docker host ports, as desired. -##### 4. Accessing management console. +#### 4. Accessing management console. - To access the management console, use the docker host IP and port 9443. + `https://:9443/carbon` @@ -44,19 +48,19 @@ You may map other container service ports, which have been exposed to Docker hos Configurations would lie on the Docker host machine and they can be volume mounted to the container.
As an example, steps required to change the port offset using `deployment.toml` is as follows: -##### 1. Stop the API Manager container if it's already running. +#### 1. Stop the API Manager container if it's already running. In WSO2 API Manager version 4.1.0 product distribution, `deployment.toml` configuration file
can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. -##### 2. Grant read permission to `other` users for `/deployment.toml`. +#### 2. Grant read permission to `other` users for `/deployment.toml`. ``` chmod o+r /deployment.toml ``` -##### 3. Run the image by mounting the file to container as follows: +#### 3. Run the image by mounting the file to container as follows: ``` docker run \ diff --git a/dockerfiles/ubuntu/apim/README.md b/dockerfiles/ubuntu/apim/README.md index e605280f..a037f5e5 100755 --- a/dockerfiles/ubuntu/apim/README.md +++ b/dockerfiles/ubuntu/apim/README.md @@ -9,7 +9,7 @@ This section defines the step-by-step instructions to build an [Ubuntu](https:// ## How to build an image and run -##### 1. Checkout this repository into your local machine using the following Git client command. +#### 1. Checkout this repository into your local machine using the following Git client command. ``` git clone https://github.com/wso2/docker-apim.git @@ -17,22 +17,26 @@ git clone https://github.com/wso2/docker-apim.git > The local copy of the `dockerfiles/ubuntu/apim` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. -##### 2. Build the Docker image. +#### 2. Build the Docker image. - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build -t wso2am:4.1.0` +``` +docker build -t wso2am:4.1.0 +``` > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. -##### 3. Running the Docker image. +#### 3. Running the Docker image. -- `docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0` +``` +docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.1.0 +``` > Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. You may map other container service ports, which have been exposed to Docker host ports, as desired. -##### 4. Accessing management console. +#### 4. Accessing management console. - To access the management console, use the docker host IP and port 9443. + `https://:9443/carbon` @@ -44,19 +48,19 @@ You may map other container service ports, which have been exposed to Docker hos Configurations would lie on the Docker host machine and they can be volume mounted to the container.
As an example, steps required to change the port offset using `deployment.toml` is as follows: -##### 1. Stop the API Manager container if it's already running. +#### 1. Stop the API Manager container if it's already running. In WSO2 API Manager version 4.1.0 product distribution, `deployment.toml` configuration file
can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. -##### 2. Grant read permission to `other` users for `/deployment.toml`. +#### 2. Grant read permission to `other` users for `/deployment.toml`. ``` chmod o+r /deployment.toml ``` -##### 3. Run the image by mounting the file to container as follows: +#### 3. Run the image by mounting the file to container as follows: ``` docker run \ From b1acf7a7a2821178b3b44dd26ecf8ad24f4b2c92 Mon Sep 17 00:00:00 2001 From: Isuru Maduranga Date: Mon, 4 Apr 2022 02:12:22 +0530 Subject: [PATCH 8/8] Add instructions to run multiarch images --- dockerfiles/centos/apim/README.md | 6 ++++++ dockerfiles/jdk8/centos/apim/README.md | 6 ++++++ dockerfiles/jdk8/ubuntu/apim/README.md | 6 ++++++ dockerfiles/ubuntu/apim/README.md | 6 ++++++ 4 files changed, 24 insertions(+) diff --git a/dockerfiles/centos/apim/README.md b/dockerfiles/centos/apim/README.md index 45283f65..734c2350 100755 --- a/dockerfiles/centos/apim/README.md +++ b/dockerfiles/centos/apim/README.md @@ -116,6 +116,12 @@ docker buildx build --platform linux/amd64,linux/arm64 -t /wso2 > - Use command "docker buildx ls" to see list of existing builders and supported platforms. > - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only +#### 5. Run +``` +docker run -it -p 9443:9443 -p 8243:8243 /wso2am:4.1.0-centos-multiarch +``` +> Docker will pull the suitable image for the architecture and run + ## Docker command usage references * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) diff --git a/dockerfiles/jdk8/centos/apim/README.md b/dockerfiles/jdk8/centos/apim/README.md index 3113f02e..cfb73a0e 100755 --- a/dockerfiles/jdk8/centos/apim/README.md +++ b/dockerfiles/jdk8/centos/apim/README.md @@ -106,6 +106,12 @@ docker buildx build --platform linux/amd64,linux/arm64 -t /wso2 > - Use command "docker buildx ls" to see list of existing builders and supported platforms. > - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only +#### 5. Run +``` +docker run -it -p 9443:9443 -p 8243:8243 /wso2am:4.1.0-centos-jdk8-multiarch +``` +> Docker will pull the suitable image for the architecture and run + ## Docker command usage references * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) diff --git a/dockerfiles/jdk8/ubuntu/apim/README.md b/dockerfiles/jdk8/ubuntu/apim/README.md index f501bc71..e2636f0c 100755 --- a/dockerfiles/jdk8/ubuntu/apim/README.md +++ b/dockerfiles/jdk8/ubuntu/apim/README.md @@ -105,6 +105,12 @@ docker buildx build --platform linux/amd64,linux/arm64 -t /wso2 > - Use command "docker buildx ls" to see list of existing builders and supported platforms. > - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only +#### 5. Run +``` +docker run -it -p 9443:9443 -p 8243:8243 /wso2am:4.1.0-jdk8-multiarch +``` +> Docker will pull the suitable image for the architecture and run + ## Docker command usage references * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) diff --git a/dockerfiles/ubuntu/apim/README.md b/dockerfiles/ubuntu/apim/README.md index a037f5e5..7b33b78f 100755 --- a/dockerfiles/ubuntu/apim/README.md +++ b/dockerfiles/ubuntu/apim/README.md @@ -105,6 +105,12 @@ docker buildx build --platform linux/amd64,linux/arm64 -t /wso2 > - Use command "docker buildx ls" to see list of existing builders and supported platforms. > - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only +#### 5. Run +``` +docker run -it -p 9443:9443 -p 8243:8243 /wso2am:4.1.0-multiarch +``` +> Docker will pull the suitable image for the architecture and run + ## Running official wso2am images It is possible to use official wso2am images without building them from the scratch.