diff --git a/dockerfiles/alpine/obam-uk/Dockerfile b/dockerfiles/alpine/obam-uk/Dockerfile new file mode 100644 index 0000000..510a451 --- /dev/null +++ b/dockerfiles/alpine/obam-uk/Dockerfile @@ -0,0 +1,117 @@ +# ---------------------------------------------------------------------------------------- +# +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. +# +# This software is the property of WSO2 LLC. and its suppliers, if any. +# Dissemination of any information or reproduction of any material contained +# herein in any form is strictly forbidden, unless permitted by WSO2 expressly. +# You may not alter or remove any copyright or other notice from copies of this content. +# +# ---------------------------------------------------------------------------------------- + +ARG BASE_DOCKER_IMAGE_REGISTRY="docker.wso2.com" +ARG BASE_PRODUCT_VERSION +ARG ACCELERATOR_PRODUCT_VERSION=3.0.0.0-am${BASE_PRODUCT_VERSION}.0-alpine +# set base Docker image to WSO2 Open Banking API Manager Alpine Docker image +FROM ${BASE_DOCKER_IMAGE_REGISTRY}/wso2-obam:${ACCELERATOR_PRODUCT_VERSION} +LABEL maintainer="WSO2 Docker Maintainers " \ + com.wso2.docker.source="https://github.com/wso2/docker-open-banking/releases/tag/v3.0.0.10" + +# set Docker image build arguments +# build arguments for user/group configurations +ARG USER=wso2carbon +ARG USER_ID=802 +ARG USER_GROUP=wso2 +ARG USER_GROUP_ID=802 +ARG USER_HOME=/home/${USER} +# build arguments for WSO2 product installation +ARG WSO2_SERVER_NAME=wso2am +# declaring again BASE_PRODUCT_VERSION ARG to use in build stage +ARG BASE_PRODUCT_VERSION +ARG WSO2_OB_TOOLKIT_NAME=wso2-obam-toolkit-uk +ARG WSO2_OB_TOOLKIT_VERSION=1.0.0 +ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${BASE_PRODUCT_VERSION} +ARG WSO2_OB_TOOLKIT=${WSO2_OB_TOOLKIT_NAME}-${WSO2_OB_TOOLKIT_VERSION} +ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} +ARG WSO2_OB_TOOLKIT_DIR=${WSO2_SERVER_HOME}/${WSO2_OB_TOOLKIT} +ARG WSO2_OB_TOOLKIT_DIST_URL +# build argument for MOTD +ARG MOTD='printf "\n\ + Welcome to WSO2 Docker Resources \n\ + --------------------------------- \n\ + This Docker container comprises of the WSO2 Open Banking Solution, with its latest GA release \n\ + which is under The WSO2 Commercial License 1.0. \n\ + Read more about The WSO2 Commercial License, Version 1.0 here @ http://wso2.com/licenses \n"' +ENV ENV=${USER_HOME}"/.ashrc" + +# configuration properties for deployment.toml file +# server hostnames +ARG IS_HOSTNAME=obiam +ARG APIM_HOSTNAME=obam +ARG BI_HOSTNAME=obbi +# databases related properties +ARG DB_TYPE=mysql +ARG DB_USER=root +ARG DB_PASS=root +ARG DB_HOST=mysql +ARG DB_DRIVER=com.mysql.jdbc.Driver +ARG DB_APIMGT=openbank_apimgtdb +ARG DB_USER_STORE=openbank_userdb +ARG DB_AM_CONFIG=openbank_am_configdb +ARG DB_GOV=openbank_govdb +ARG DB_IS_CONFIG=openbank_iskm_configdb +ARG DB_OPEN_BANKING_STORE=openbank_openbankingdb +ARG DB_OB_REPORTING=openbank_ob_reporting_statsdb +ARG DB_OB_REPORTING_SUMMARIZED=openbank_ob_reporting_summarizeddb + +# change user to root for elevated permissions to override inherited non-root user +USER root + +# add Open Banking artifacts to base product +RUN \ + wget -O ${WSO2_OB_TOOLKIT}.zip "${WSO2_OB_TOOLKIT_DIST_URL}" \ + && unzip -d ${WSO2_SERVER_HOME}/ ${WSO2_OB_TOOLKIT}.zip \ + && rm -f ${WSO2_OB_TOOLKIT}.zip + +# set configurations +# read deployment.toml file +ARG DEPLOYMENT_TOML_FILE=${WSO2_OB_TOOLKIT_DIR}/repository/resources/deployment.toml +RUN \ + cp ${WSO2_OB_TOOLKIT_DIR}/repository/resources/wso2am-4.0.0-deployment-uk.toml ${DEPLOYMENT_TOML_FILE} \ +# configure hostnames + && sed -i -e 's|IS_HOSTNAME|'${IS_HOSTNAME}'|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|APIM_HOSTNAME|'${APIM_HOSTNAME}'|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|BI_HOSTNAME|'${BI_HOSTNAME}'|g' ${DEPLOYMENT_TOML_FILE} \ +# configure datasources + && sed -i -e 's|DB_APIMGT_URL|jdbc:mysql://'${DB_HOST}':3306/'${DB_APIMGT}'?autoReconnect=true\&useSSL=false|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|DB_AM_CONFIG_URL|jdbc:mysql://'${DB_HOST}':3306/'${DB_AM_CONFIG}'?autoReconnect=true\&useSSL=false|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|DB_GOV_URL|jdbc:mysql://'${DB_HOST}':3306/'${DB_GOV}'?autoReconnect=true\&useSSL=false|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|DB_USER_STORE_URL|jdbc:mysql://'${DB_HOST}':3306/'${DB_USER_STORE}'?autoReconnect=true\&useSSL=false|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|DB_USER|'${DB_USER}'|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|DB_PASS|'${DB_PASS}'|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|DB_DRIVER|'${DB_DRIVER}'|g' ${DEPLOYMENT_TOML_FILE} \ +# copy deployment.toml file to repository/conf + && cp ${DEPLOYMENT_TOML_FILE} ${WSO2_SERVER_HOME}/repository/conf/ \ + && rm ${DEPLOYMENT_TOML_FILE} + +# copy the WSO2 OB APIM UK Toolkit artifacts on top of WSO2 APIM base product +# Remove default backend war +RUN \ + rm ${WSO2_SERVER_HOME}/repository/deployment/server/webapps/api#openbanking#backend.war\ +# copy toolkit artifacts + && cp -r ${WSO2_OB_TOOLKIT_DIR}/carbon-home/* "${WSO2_SERVER_HOME}" + +# change directory rights +RUN chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME}/ + +# set MOTD login message for open banking +RUN echo ${MOTD} > "${ENV}" + +# set the non-root user +USER ${USER_ID} + +# expose ports +EXPOSE 9443 8280 8243 + +# initiate container and start WSO2 Carbon server +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/alpine/obam-uk/README.md b/dockerfiles/alpine/obam-uk/README.md new file mode 100644 index 0000000..2bc3c6e --- /dev/null +++ b/dockerfiles/alpine/obam-uk/README.md @@ -0,0 +1,76 @@ +# Dockerfile for WSO2 Open Banking API Manager UK Toolkit Module +This section defines the step-by-step instructions to build an [Alpine](https://hub.docker.com/_/alpine/) Linux based Docker image for WSO2 Open Banking API Manager UK Toolkit with WSO2 APIM 4.2.0. + +## Prerequisites + +* [Docker](https://www.docker.com/get-docker) v20.10.10 or above +* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client +* WSO2 Open Banking API Manager UK Toolkit Module pack + + + Host the downloaded artifacts locally or on a remote location. + > The hosted locations of artifacts will be passed as the build arguments when building the Docker image.
+ > 1. **WSO2_OB_TOOLKIT_DIST_URL** - UK Toolkit location + + +## How to build an image and run + +##### 1. Checkout this repository into your local machine using the following Git client command. + +``` +git clone https://github.com/wso2/docker-open-banking.git +``` + +> The local copy of the `dockerfiles/alpine/obam-uk` directory will be referred to as `OBAM_UK_DOCKERFILE_HOME` from this point onwards. + +##### 2. Build the Docker image. + +- Navigate to `` directory.
+ Execute `docker build` command as shown below. + + `docker build --build-arg BASE_PRODUCT_VERSION= --build-arg WSO2_OB_TOOLKIT_DIST_URL= -t wso2-obam-uk:1.0.0-alpine .`
+ > eg:- **Hosted locally**: `docker build --build-arg BASE_PRODUCT_VERSION=4.2.0 --build-arg WSO2_OB_TOOLKIT_DIST_URL=http://localhost:8000/wso2-obam-toolkit-uk-1.0.0.tar.gz -t wso2-obam-uk:1.0.0-alpine .`

+ > eg:- **Hosted remotely**: `docker build --build-arg BASE_PRODUCT_VERSION=4.2.0 --build-arg WSO2_OB_TOOLKIT_DIST_URL=http:///wso2-obam-toolkit-uk-1.0.0.tar.gz -t wso2-obam-uk:1.0.0-alpine .` + +##### 3. Running the Docker image. + +- `docker run -it -p 9443:9443 -p 8243:8243 -p 8280:8280 wso2-obam-uk:1.0.0-alpine` + +##### 4. Accessing management console. + +- To access the management console, use the docker host IP and port 9443. + + `https::9443/carbon` + +> In here, refers to hostname or IP of the host machine on top of which containers are spawned. + +## How to update configurations + +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. + +In WSO2 Open Banking API Manager UK Toolkit 1.0.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 under ports to 1. + +##### 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: + +``` +docker run \ +-p 9444:9444 \ +--volume /deployment.toml:/deployment.toml \ +wso2-obam-uk:1.0.0-alpine +``` + +> In here, refers to /home/wso2carbon/wso2am-4.0.0/repository/conf folder of the container. + +## 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/) diff --git a/dockerfiles/alpine/obbi-uk/Dockerfile b/dockerfiles/alpine/obbi-uk/Dockerfile new file mode 100644 index 0000000..d02c862 --- /dev/null +++ b/dockerfiles/alpine/obbi-uk/Dockerfile @@ -0,0 +1,96 @@ +# ---------------------------------------------------------------------------------------- +# +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. +# +# This software is the property of WSO2 LLC. and its suppliers, if any. +# Dissemination of any information or reproduction of any material contained +# herein in any form is strictly forbidden, unless permitted by WSO2 expressly. +# You may not alter or remove any copyright or other notice from copies of this content. +# +# ---------------------------------------------------------------------------------------- + +ARG BASE_DOCKER_IMAGE_REGISTRY="docker.wso2.com" +ARG BASE_PRODUCT_VERSION +ARG ACCELERATOR_PRODUCT_VERSION=3.0.0.0-si${BASE_PRODUCT_VERSION}.0-alpine +# set base Docker image to WSO2 Open Banking Business Intelligence Alpine Docker image +FROM ${BASE_DOCKER_IMAGE_REGISTRY}/wso2-obbi:${ACCELERATOR_PRODUCT_VERSION} +LABEL maintainer="WSO2 Docker Maintainers " \ + com.wso2.docker.source="https://github.com/wso2/docker-open-banking/releases/tag/v3.0.0.10" + +# set Docker image build arguments +# build arguments for user/group configurations +ARG USER=wso2carbon +ARG USER_ID=802 +ARG USER_GROUP=wso2 +ARG USER_GROUP_ID=802 +ARG USER_HOME=/home/${USER} +# build arguments for WSO2 product installation +ARG WSO2_SERVER_NAME=wso2si +# declaring again BASE_PRODUCT_VERSION ARG to use in build stage +ARG BASE_PRODUCT_VERSION +ARG WSO2_OB_TOOLKIT_NAME=wso2-obbi-toolkit-uk +ARG WSO2_OB_TOOLKIT_VERSION=1.0.0 +ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${BASE_PRODUCT_VERSION} +ARG WSO2_OB_TOOLKIT=${WSO2_OB_TOOLKIT_NAME}-${WSO2_OB_TOOLKIT_VERSION} +ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} +ARG WSO2_OB_TOOLKIT_DIR=${WSO2_SERVER_HOME}/${WSO2_OB_TOOLKIT} +ARG WSO2_OB_TOOLKIT_DIST_URL +# build argument for MOTD +ARG MOTD='printf "\n\ + Welcome to WSO2 Docker Resources \n\ + --------------------------------- \n\ + This Docker container comprises of the WSO2 Open Banking Solution, with its latest GA release \n\ + which is under The WSO2 Commercial License 1.0. \n\ + Read more about The WSO2 Commercial License, Version 1.0 here @ http://wso2.com/licenses \n"' +ENV ENV=${USER_HOME}"/.ashrc" + +# configuration properties for deployment.toml file +# server hostnames +ARG IS_HOSTNAME=obiam +ARG APIM_HOSTNAME=obam +ARG BI_HOSTNAME=obbi +# databases related properties +ARG DB_TYPE=mysql +ARG DB_USER=root +ARG DB_PASS=root +ARG DB_HOST=mysql +ARG DB_DRIVER=com.mysql.jdbc.Driver +ARG DB_APIMGT=openbank_apimgtdb +ARG DB_USER_STORE=openbank_userdb +ARG DB_AM_CONFIG=openbank_am_configdb +ARG DB_GOV=openbank_govdb +ARG DB_IS_CONFIG=openbank_iskm_configdb +ARG DB_OPEN_BANKING_STORE=openbank_openbankingdb +ARG DB_OB_REPORTING=openbank_ob_reporting_statsdb +ARG DB_OB_REPORTING_SUMMARIZED=openbank_ob_reporting_summarizeddb + +# change user to root for elevated permissions to override inherited non-root user +USER root + +# add Open Banking artifacts to base product +RUN \ + wget -O ${WSO2_OB_TOOLKIT}.zip "${WSO2_OB_TOOLKIT_DIST_URL}" \ + && unzip -d ${WSO2_SERVER_HOME}/ ${WSO2_OB_TOOLKIT}.zip \ + && rm -f ${WSO2_OB_TOOLKIT}.zip + +# copy the WSO2 OB BI UK Toolkit artifacts on top of WSO2 OBBI accelarator image +# Remove default AuthenticationDataSubmissionApp.siddhi +RUN \ + rm ${WSO2_SERVER_HOME}/deployment/siddhi-files/AuthenticationDataSubmissionApp.siddhi \ +# copy toolkit artifacts + && cp -r ${WSO2_OB_TOOLKIT_DIR}/carbon-home/* "${WSO2_SERVER_HOME}" + +# change directory rights +RUN chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME}/ + +# set MOTD login message for open banking +RUN echo ${MOTD} > "${ENV}" + +# set the non-root user +USER ${USER_ID} + +# expose server ports +EXPOSE 9712 9612 7712 7612 9092 9444 + +# initiate container and start WSO2 Carbon server +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/alpine/obbi-uk/README.md b/dockerfiles/alpine/obbi-uk/README.md new file mode 100644 index 0000000..dd6bd3b --- /dev/null +++ b/dockerfiles/alpine/obbi-uk/README.md @@ -0,0 +1,82 @@ +# Dockerfile for WSO2 Open Banking Business Intelligence UK Toolkit Module +This section defines the step-by-step instructions to build an [Alpine](https://hub.docker.com/_/alpine/) Linux based Docker image for WSO2 Open Banking Business Intelligence UK Toolkit. + +## Prerequisites + +* [Docker](https://www.docker.com/get-docker) v20.10.10 or above +* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client +* WSO2 Open Banking API Manager UK Toolkit Module pack + + + Host the downloaded artifacts locally or on a remote location. + > The hosted locations of artifacts will be passed as the build arguments when building the Docker image.
+ > 1. **WSO2_OB_TOOLKIT_DIST_URL** - UK Toolkit location + + +## How to build an image and run + +##### 1. Checkout this repository into your local machine using the following Git client command. + +``` +git clone https://github.com/wso2/docker-open-banking.git +``` + +> The local copy of the `dockerfiles/alpine/obbi-uk` directory will be referred to as `OBBI_UK_DOCKERFILE_HOME` from this point onwards. + +##### 2. Build the Docker image. + +- Navigate to `` directory.
+ Execute `docker build` command as shown below. + + `docker build --build-arg BASE_PRODUCT_VERSION= --build-arg WSO2_OB_TOOLKIT_DIST_URL= -t wso2-obbi-uk:1.0.0-alpine .`
+ > eg:- **Hosted locally**: `docker build --build-arg BASE_PRODUCT_VERSION=4.2.0 --build-arg WSO2_OB_TOOLKIT_DIST_URL=http://localhost:8000/wso2-obbi-toolkit-uk-1.0.0.tar.gz -t wso2-obbi-toolkit-uk:1.0.0-alpine .`

+ > eg:- **Hosted remotely**: `docker build --build-arg BASE_PRODUCT_VERSION=4.2.0 --build-arg WSO2_OB_TOOLKIT_DIST_URL=http:///wso2-obbi-toolkit-uk-1.0.0.tar.gz -t wso2-obbi-toolkit-uk:1.0.0-alpine .` + +##### 3. Running the Docker image. + +- `docker run -it -p 9712:9712 -p 9612:9612 -p 7712:7712 -p 7612:7612 -p 9092:9092 -p 9444:9444 wso2-obbi-uk:1.0.0-alpine` + +## How to update configurations + +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.yaml` is as follows: + +- Make sure that API Manager analytics is enabled in `/repository/conf/deployment.toml` as follows. +``` +[apim.analytics] +enable = true +``` + +- Go to `/repository/conf/deployment.toml` and `/repository/conf/deployment.toml` to enable open banking data publishing as follows: + +``` +[open_banking.data_publishing] +enable = true +``` + +##### 1. Stop the OBBI container if it's already running. + +In WSO2 Open Banking BI 3.0.0 product distribution, `deployment.yaml` configuration file
+can be found at `/conf/server`. Copy the file to some suitable location of the host machine,
+referred to as `/deployment.yaml` and change the offset value under ports to 1. + +##### 2. Grant read permission to `other` users for `/deployment.yaml`. + +``` +chmod o+r /deployment.yaml +``` + +##### 3. Run the image by mounting the file to container as follows: + +``` +docker run \ +-p 9712:9712 -p 9612:9612 -p 7712:7712 -p 7612:7612 -p 9092:9092 -p 9444:9444 \ +--volume /deployment.yaml:/deployment.yaml \ +wso2-obbi-uk:1.0.0-alpine +``` + +> In here, refers to /home/wso2carbon/wso2si-4.0.0/conf/server folder of the container. + +## 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/) diff --git a/dockerfiles/alpine/obiam-uk/Dockerfile b/dockerfiles/alpine/obiam-uk/Dockerfile new file mode 100644 index 0000000..be443d3 --- /dev/null +++ b/dockerfiles/alpine/obiam-uk/Dockerfile @@ -0,0 +1,116 @@ +# ---------------------------------------------------------------------------------------- +# +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. +# +# This software is the property of WSO2 LLC. and its suppliers, if any. +# Dissemination of any information or reproduction of any material contained +# herein in any form is strictly forbidden, unless permitted by WSO2 expressly. +# You may not alter or remove any copyright or other notice from copies of this content. +# +# ---------------------------------------------------------------------------------------- + +ARG BASE_DOCKER_IMAGE_REGISTRY="docker.wso2.com" +ARG BASE_PRODUCT_VERSION +ARG ACCELERATOR_PRODUCT_VERSION=3.0.0.0-is${BASE_PRODUCT_VERSION}.0-alpine +# set base Docker image to WSO2 Open Banking Identity Server Alpine Docker image +FROM ${BASE_DOCKER_IMAGE_REGISTRY}/wso2-obiam:${ACCELERATOR_PRODUCT_VERSION} +LABEL maintainer="WSO2 Docker Maintainers " \ + com.wso2.docker.source="https://github.com/wso2/docker-open-banking/releases/tag/v3.0.0.10" + +# set Docker image build arguments +# build arguments for user/group configurations +ARG USER=wso2carbon +ARG USER_ID=802 +ARG USER_GROUP=wso2 +ARG USER_GROUP_ID=802 +ARG USER_HOME=/home/${USER} +# build arguments for WSO2 product installation +ARG WSO2_SERVER_NAME=wso2is +# declaring again BASE_PRODUCT_VERSION ARG to use in build stage +ARG BASE_PRODUCT_VERSION +ARG WSO2_OB_TOOLKIT_NAME=wso2-obiam-toolkit-uk +ARG WSO2_OB_TOOLKIT_VERSION=1.0.0 +ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${BASE_PRODUCT_VERSION} +ARG WSO2_OB_TOOLKIT=${WSO2_OB_TOOLKIT_NAME}-${WSO2_OB_TOOLKIT_VERSION} +ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} +ARG WSO2_OB_TOOLKIT_DIR=${WSO2_SERVER_HOME}/${WSO2_OB_TOOLKIT} +ARG WSO2_OB_TOOLKIT_DIST_URL +# build argument for MOTD +ARG MOTD='printf "\n\ + Welcome to WSO2 Docker Resources \n\ + --------------------------------- \n\ + This Docker container comprises of The WSO2 Open Banking Solution, with its latest GA release \n\ + which is under The WSO2 Commercial License 1.0. \n\ + Read more about The WSO2 Commercial License, Version 1.0 here @ http://wso2.com/licenses \n"' +ENV ENV=${USER_HOME}"/.ashrc" + +# configuration properties for deployment.toml file +# server hostnames +ARG IS_HOSTNAME=obiam +ARG APIM_HOSTNAME=obam +ARG BI_HOSTNAME=obbi +# databases related properties +ARG DB_TYPE=mysql +ARG DB_USER=root +ARG DB_PASS=root +ARG DB_HOST=mysql +ARG DB_DRIVER=com.mysql.jdbc.Driver +ARG DB_APIMGT=openbank_apimgtdb +ARG DB_USER_STORE=openbank_userdb +ARG DB_AM_CONFIG=openbank_am_configdb +ARG DB_GOV=openbank_govdb +ARG DB_IS_CONFIG=openbank_iskm_configdb +ARG DB_OPEN_BANKING_STORE=openbank_openbankingdb +ARG DB_OB_REPORTING=openbank_ob_reporting_statsdb +ARG DB_OB_REPORTING_SUMMARIZED=openbank_ob_reporting_summarizeddb + +# change user to root for elevated permissions to override inherited non-root user +USER root + +# add Open Banking artifacts to base product +RUN \ + wget -O ${WSO2_OB_TOOLKIT}.zip "${WSO2_OB_TOOLKIT_DIST_URL}" \ + && unzip -d ${WSO2_SERVER_HOME}/ ${WSO2_OB_TOOLKIT}.zip \ + && rm -f ${WSO2_OB_TOOLKIT}.zip + +# set configurations +# read deployment.toml file +ARG DEPLOYMENT_TOML_FILE=${WSO2_OB_TOOLKIT_DIR}/repository/resources/deployment.toml +RUN \ + cp ${WSO2_OB_TOOLKIT_DIR}/repository/resources/wso2is-5.11.0-deployment-uk.toml ${DEPLOYMENT_TOML_FILE} \ +# configure hostnames + && sed -i -e 's|IS_HOSTNAME|'${IS_HOSTNAME}'|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|APIM_HOSTNAME|'${APIM_HOSTNAME}'|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|BI_HOSTNAME|'${BI_HOSTNAME}'|g' ${DEPLOYMENT_TOML_FILE} \ +# configure datasources + && sed -i -e 's|DB_APIMGT_URL|jdbc:mysql://'${DB_HOST}':3306/'${DB_APIMGT}'?autoReconnect=true\&useSSL=false|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|DB_GOV_URL|jdbc:mysql://'${DB_HOST}':3306/'${DB_GOV}'?autoReconnect=true\&useSSL=false|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|DB_IS_CONFIG_URL|jdbc:mysql://'${DB_HOST}':3306/'${DB_IS_CONFIG}'?autoReconnect=true\&useSSL=false|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|DB_USER_STORE_URL|jdbc:mysql://'${DB_HOST}':3306/'${DB_USER_STORE}'?autoReconnect=true\&useSSL=false|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|DB_OB_STORE_URL|jdbc:mysql://'${DB_HOST}':3306/'${DB_OPEN_BANKING_STORE}'?autoReconnect=true\&useSSL=false|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|DB_USER|'${DB_USER}'|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|DB_PASS|'${DB_PASS}'|g' ${DEPLOYMENT_TOML_FILE} \ + && sed -i -e 's|DB_DRIVER|'${DB_DRIVER}'|g' ${DEPLOYMENT_TOML_FILE} \ +# copy deployment.toml file to original product pack location + && cp ${DEPLOYMENT_TOML_FILE} ${WSO2_SERVER_HOME}/repository/conf/ \ + && rm ${DEPLOYMENT_TOML_FILE} + +# copy the WSO2 OB IAM UK Toolkit artifacts on top of WSO2 IS base product +# copy open banking artifacts +RUN\ + cp -r ${WSO2_OB_TOOLKIT_DIR}/carbon-home/* "${WSO2_SERVER_HOME}" + +# change directory rights +RUN chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME}/ + +# set the non-root user +USER ${USER_ID} + +# set MOTD login message for open banking +RUN echo ${MOTD} > "${ENV}" + +# expose ports +EXPOSE 9446 + +# initiate container and start WSO2 Carbon server +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/alpine/obiam-uk/README.md b/dockerfiles/alpine/obiam-uk/README.md new file mode 100644 index 0000000..6815b26 --- /dev/null +++ b/dockerfiles/alpine/obiam-uk/README.md @@ -0,0 +1,79 @@ +# Dockerfile for WSO2 Open Banking Identity & Access Management UK Toolkit Module +This section defines the step-by-step instructions to build an [Alpine](https://hub.docker.com/_/alpine/) Linux based Docker image for WSO2 Open Banking Identity & Access Management UK Toolkit Module with WSO2 IS 6.0.0. + +## Prerequisites + +* [Docker](https://www.docker.com/get-docker) v20.10.10 or above +* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client +* WSO2 Open Banking Identity & Access Management UK Toolkit Module pack +* Download the WSO2 IS Connector to configure the Identity Server with the API Manager. Please go through this [link](https://ob.docs.wso2.com/en/latest/get-started/quick-start-guide/#installing-base-products) to find respective WSO2 IS Connector according to the API Manager version. Extract the dowloaded WSO2 IS Connector into your local machine. + + Host the downloaded artifacts locally or on a remote location. + > The hosted locations of artifacts will be passed as the build arguments when building the Docker image.
+ > 1. **WSO2_OB_TOOLKIT_DIST_URL** - UK Toolkit location + +## How to build an image and run + +##### 1. Checkout this repository into your local machine using the following Git client command. + +``` +git clone https://github.com/wso2/docker-open-banking.git +``` + +> The local copy of the `dockerfiles/alpine/obiam-uk` directory will be referred to as `OBIAM_UK_DOCKERFILE_HOME` from this point onwards. + +##### 2. Build the Docker image. + +- Navigate to `` directory.
+ Execute `docker build` command as shown below. + + `docker build --build-arg BASE_PRODUCT_VERSION= --build-arg WSO2_OB_TOOLKIT_DIST_URL= -t wso2-obiam-uk:1.0.0-alpine .`
+ > eg:- **Hosted locally**: `docker build --build-arg BASE_PRODUCT_VERSION=6.0.0 --build-arg WSO2_OB_TOOLKIT_DIST_URL=http://localhost:8000/wso2-obiam-toolkit-uk-1.0.0.tar.gz -t wso2-obiam-uk:1.0.0-alpine .`

+ > eg:- **Hosted remotely**: `docker build --build-arg BASE_PRODUCT_VERSION=6.0.0 --build-arg WSO2_OB_TOOLKIT_DIST_URL=http:///wso2-obiam-toolkit-uk-1.0.0.tar.gz -t wso2-obiam-uk:1.0.0-alpine .` + +##### 3. Running the Docker image. +if you are only using the WSO2 Open Banking Identity Server, please run the below command. +> - `docker run -it -p 9446:9446 wso2-obiam-uk:1.0.0-alpine` + +If you are using WSO2 Open Banking Identity Server and WSO2 Open Banking API Manager, please run the below command. +> - `docker run -it -p 9446:9446 -v /dropins:/home/wso2carbon/wso2-artifact-volume/repository/components/dropins/ -v /webapps:/home/wso2carbon/wso2-artifact-volume/repository/deployment/server/webapps/ wso2-obiam-uk:1.0.0-alpine` +> In here, refers to the root directory path of the extracted WSO2 IS Connector. + +##### 4. Accessing management console. + +- To access the management console, use the docker host IP and port 9446. + + `https::9446/carbon` + +> In here, refers to hostname or IP of the host machine on top of which containers are spawned. + +## How to update configurations + +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 Identity & Access Management Module container if it's already running. + +In WSO2 Open Banking Identity & Access Management UK Toolkit 1.0.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 under ports to 1. + +##### 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: + +``` +docker run \ +-p 9447:9447 \ +--volume /deployment.toml:/deployment.toml \ +wso2-obiam-uk:1.0.0-alpine +``` + +> In here, refers to /home/wso2carbon/wso2is-5.11.0/repository/conf folder of the container. + +## 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/) diff --git a/dockerfiles/ubuntu/obam-uk/Dockerfile b/dockerfiles/ubuntu/obam-uk/Dockerfile index c30c620..9990e4a 100644 --- a/dockerfiles/ubuntu/obam-uk/Dockerfile +++ b/dockerfiles/ubuntu/obam-uk/Dockerfile @@ -10,10 +10,10 @@ # ---------------------------------------------------------------------------------------- ARG BASE_DOCKER_IMAGE_REGISTRY="docker.wso2.com" -ARG BASE_PRODUCT_VERSION=3.0.0.0 - +ARG BASE_PRODUCT_VERSION +ARG ACCELERATOR_PRODUCT_VERSION=3.0.0.0-am${BASE_PRODUCT_VERSION}.0 # set base Docker image to WSO2 Open Banking API Manager Ubuntu Docker image -FROM ${BASE_DOCKER_IMAGE_REGISTRY}/wso2-obam:${BASE_PRODUCT_VERSION} +FROM ${BASE_DOCKER_IMAGE_REGISTRY}/wso2-obam:${ACCELERATOR_PRODUCT_VERSION} LABEL maintainer="WSO2 Docker Maintainers " \ com.wso2.docker.source="https://github.com/wso2/docker-open-banking/releases/tag/v3.0.0.10" @@ -26,10 +26,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 +# declaring again BASE_PRODUCT_VERSION ARG to use in build stage +ARG BASE_PRODUCT_VERSION ARG WSO2_OB_TOOLKIT_NAME=wso2-obam-toolkit-uk ARG WSO2_OB_TOOLKIT_VERSION=1.0.0 -ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} +ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${BASE_PRODUCT_VERSION} ARG WSO2_OB_TOOLKIT=${WSO2_OB_TOOLKIT_NAME}-${WSO2_OB_TOOLKIT_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} ARG WSO2_OB_TOOLKIT_DIR=${WSO2_SERVER_HOME}/${WSO2_OB_TOOLKIT} @@ -65,6 +66,13 @@ ARG DB_OB_REPORTING_SUMMARIZED=openbank_ob_reporting_summarizeddb # change user to root for elevated permissions to override inherited non-root user USER root +# install dependencies +RUN if [ "${BASE_PRODUCT_VERSION}" = "4.2.0" ]; then \ + apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends unzip wget \ + && rm -rf /var/lib/apt/lists/* ; \ + fi + # add Open Banking artifacts to base product RUN \ wget -O ${WSO2_OB_TOOLKIT}.zip "${WSO2_OB_TOOLKIT_DIST_URL}" \ @@ -104,6 +112,11 @@ RUN \ chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME}/ \ && chown wso2carbon:wso2 /etc/motd +# remove unnecesary packages +RUN if [ "${BASE_PRODUCT_VERSION}" = "4.2.0" ]; then \ + apt-get purge -y unzip wget ;\ + fi + # set the non-root user USER ${USER_ID} diff --git a/dockerfiles/ubuntu/obam-uk/README.md b/dockerfiles/ubuntu/obam-uk/README.md index 9acd45a..510df75 100644 --- a/dockerfiles/ubuntu/obam-uk/README.md +++ b/dockerfiles/ubuntu/obam-uk/README.md @@ -1,11 +1,12 @@ # Dockerfile for WSO2 Open Banking API Manager UK Toolkit Module -This section defines the step-by-step instructions to build an [Ubuntu](https://hub.docker.com/_/ubuntu/) Linux based Docker image for WSO2 Open Banking API Manager UK Toolkit with WSO2 APIM 4.1.0. +This section defines the step-by-step instructions to build an [Ubuntu](https://hub.docker.com/_/ubuntu/) Linux based Docker image for WSO2 Open Banking API Manager UK Toolkit with WSO2 APIM 4.2.0. ## Prerequisites * [Docker](https://www.docker.com/get-docker) v20.10.10 or above * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client * WSO2 Open Banking API Manager UK Toolkit Module pack + + Host the downloaded artifacts locally or on a remote location. > The hosted locations of artifacts will be passed as the build arguments when building the Docker image.
> 1. **WSO2_OB_TOOLKIT_DIST_URL** - UK Toolkit location @@ -25,9 +26,9 @@ git clone https://github.com/wso2/docker-open-banking.git - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build --build-arg WSO2_OB_TOOLKIT_DIST_URL= -t wso2-obam-uk:1.0.0 .`
- > eg:- **Hosted locally**: `docker build --build-arg WSO2_OB_TOOLKIT_DIST_URL=http://localhost:8000/wso2-obam-toolkit-uk-1.0.0.tar.gz -t wso2-obam-uk:1.0.0 .`

- > eg:- **Hosted remotely**: `docker build --build-arg WSO2_OB_TOOLKIT_DIST_URL=http:///wso2-obam-toolkit-uk-1.0.0.tar.gz -t wso2-obam-uk:1.0.0 .` + + `docker build --build-arg BASE_PRODUCT_VERSION= --build-arg WSO2_OB_TOOLKIT_DIST_URL= -t wso2-obam-uk:1.0.0 .`
+ > eg:- **Hosted locally**: `docker build --build-arg BASE_PRODUCT_VERSION=4.2.0 --build-arg WSO2_OB_TOOLKIT_DIST_URL=http://localhost:8000/wso2-obam-toolkit-uk-1.0.0.tar.gz -t wso2-obam-uk:1.0.0 .`

+ > eg:- **Hosted remotely**: `docker build --build-arg BASE_PRODUCT_VERSION=4.2.0 --build-arg WSO2_OB_TOOLKIT_DIST_URL=http:///wso2-obam-toolkit-uk-1.0.0.tar.gz -t wso2-obam-uk:1.0.0 .` ##### 3. Running the Docker image. diff --git a/dockerfiles/ubuntu/obbi-uk/Dockerfile b/dockerfiles/ubuntu/obbi-uk/Dockerfile index beb5f07..d6c34eb 100644 --- a/dockerfiles/ubuntu/obbi-uk/Dockerfile +++ b/dockerfiles/ubuntu/obbi-uk/Dockerfile @@ -10,10 +10,10 @@ # ---------------------------------------------------------------------------------------- ARG BASE_DOCKER_IMAGE_REGISTRY="docker.wso2.com" -ARG BASE_PRODUCT_VERSION=3.0.0.0 - +ARG BASE_PRODUCT_VERSION +ARG ACCELERATOR_PRODUCT_VERSION=3.0.0.0-si${BASE_PRODUCT_VERSION}.0 # set base Docker image to WSO2 Open Banking Business Intelligence Ubuntu Docker image -FROM ${BASE_DOCKER_IMAGE_REGISTRY}/wso2-obbi:${BASE_PRODUCT_VERSION} +FROM ${BASE_DOCKER_IMAGE_REGISTRY}/wso2-obbi:${ACCELERATOR_PRODUCT_VERSION} LABEL maintainer="WSO2 Docker Maintainers " \ com.wso2.docker.source="https://github.com/wso2/docker-open-banking/releases/tag/v3.0.0.10" @@ -26,10 +26,11 @@ ARG USER_GROUP_ID=802 ARG USER_HOME=/home/${USER} # build arguments for WSO2 product installation ARG WSO2_SERVER_NAME=wso2si -ARG WSO2_SERVER_VERSION=4.2.0 +# declaring again BASE_PRODUCT_VERSION ARG to use in build stage +ARG BASE_PRODUCT_VERSION ARG WSO2_OB_TOOLKIT_NAME=wso2-obbi-toolkit-uk ARG WSO2_OB_TOOLKIT_VERSION=1.0.0 -ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} +ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${BASE_PRODUCT_VERSION} ARG WSO2_OB_TOOLKIT=${WSO2_OB_TOOLKIT_NAME}-${WSO2_OB_TOOLKIT_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} ARG WSO2_OB_TOOLKIT_DIR=${WSO2_SERVER_HOME}/${WSO2_OB_TOOLKIT} @@ -66,9 +67,11 @@ ARG DB_OB_REPORTING_SUMMARIZED=openbank_ob_reporting_summarizeddb USER root # install dependencies -RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends unzip wget \ - && rm -rf /var/lib/apt/lists/* +RUN if [ "${BASE_PRODUCT_VERSION}" = "4.2.0" ]; then \ + apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends unzip wget \ + && rm -rf /var/lib/apt/lists/* ; \ + fi # add Open Banking artifacts to base product RUN \ @@ -89,7 +92,9 @@ RUN \ && chown wso2carbon:wso2 /etc/motd # remove unnecesary packages -RUN apt-get purge -y unzip wget +RUN if [ "${BASE_PRODUCT_VERSION}" = "4.2.0" ]; then \ + apt-get purge -y unzip wget ;\ + fi # set the non-root user USER ${USER_ID} diff --git a/dockerfiles/ubuntu/obbi-uk/README.md b/dockerfiles/ubuntu/obbi-uk/README.md index 1a64d96..b6b94df 100644 --- a/dockerfiles/ubuntu/obbi-uk/README.md +++ b/dockerfiles/ubuntu/obbi-uk/README.md @@ -6,6 +6,7 @@ This section defines the step-by-step instructions to build an [Ubuntu](https:// * [Docker](https://www.docker.com/get-docker) v20.10.10 or above * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client * WSO2 Open Banking API Manager UK Toolkit Module pack + + Host the downloaded artifacts locally or on a remote location. > The hosted locations of artifacts will be passed as the build arguments when building the Docker image.
> 1. **WSO2_OB_TOOLKIT_DIST_URL** - UK Toolkit location @@ -25,9 +26,9 @@ git clone https://github.com/wso2/docker-open-banking.git - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build --build-arg WSO2_OB_TOOLKIT_DIST_URL= -t wso2-obbi-uk:1.0.0 .`
- > eg:- **Hosted locally**: `docker build --build-arg WSO2_OB_TOOLKIT_DIST_URL=http://localhost:8000/wso2-obbi-toolkit-uk-1.0.0.tar.gz -t wso2-obbi-toolkit-uk:1.0.0 .`

- > eg:- **Hosted remotely**: `docker build --build-arg WSO2_OB_TOOLKIT_DIST_URL=http:///wso2-obbi-toolkit-uk-1.0.0.tar.gz -t wso2-obbi-toolkit-uk:1.0.0 .` + + `docker build --build-arg BASE_PRODUCT_VERSION= --build-arg WSO2_OB_TOOLKIT_DIST_URL= -t wso2-obbi-uk:1.0.0 .`
+ > eg:- **Hosted locally**: `docker build --build-arg BASE_PRODUCT_VERSION=4.2.0 --build-arg WSO2_OB_TOOLKIT_DIST_URL=http://localhost:8000/wso2-obbi-toolkit-uk-1.0.0.tar.gz -t wso2-obbi-toolkit-uk:1.0.0 .`

+ > eg:- **Hosted remotely**: `docker build --build-arg BASE_PRODUCT_VERSION=4.2.0 --build-arg WSO2_OB_TOOLKIT_DIST_URL=http:///wso2-obbi-toolkit-uk-1.0.0.tar.gz -t wso2-obbi-toolkit-uk:1.0.0 .` ##### 3. Running the Docker image. diff --git a/dockerfiles/ubuntu/obiam-uk/Dockerfile b/dockerfiles/ubuntu/obiam-uk/Dockerfile index d418beb..4a601f2 100644 --- a/dockerfiles/ubuntu/obiam-uk/Dockerfile +++ b/dockerfiles/ubuntu/obiam-uk/Dockerfile @@ -10,10 +10,10 @@ # ---------------------------------------------------------------------------------------- ARG BASE_DOCKER_IMAGE_REGISTRY="docker.wso2.com" -ARG BASE_PRODUCT_VERSION=3.0.0.0 - +ARG BASE_PRODUCT_VERSION +ARG ACCELERATOR_PRODUCT_VERSION=3.0.0.0-is${BASE_PRODUCT_VERSION}.0 # set base Docker image to WSO2 Open Banking Identity Server Ubuntu Docker image -FROM ${BASE_DOCKER_IMAGE_REGISTRY}/wso2-obiam:${BASE_PRODUCT_VERSION} +FROM ${BASE_DOCKER_IMAGE_REGISTRY}/wso2-obiam:${ACCELERATOR_PRODUCT_VERSION} LABEL maintainer="WSO2 Docker Maintainers " \ com.wso2.docker.source="https://github.com/wso2/docker-open-banking/releases/tag/v3.0.0.10" @@ -26,10 +26,11 @@ ARG USER_GROUP_ID=802 ARG USER_HOME=/home/${USER} # build arguments for WSO2 product installation ARG WSO2_SERVER_NAME=wso2is -ARG WSO2_SERVER_VERSION=5.11.0 +# declaring again BASE_PRODUCT_VERSION ARG to use in build stage +ARG BASE_PRODUCT_VERSION ARG WSO2_OB_TOOLKIT_NAME=wso2-obiam-toolkit-uk ARG WSO2_OB_TOOLKIT_VERSION=1.0.0 -ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} +ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${BASE_PRODUCT_VERSION} ARG WSO2_OB_TOOLKIT=${WSO2_OB_TOOLKIT_NAME}-${WSO2_OB_TOOLKIT_VERSION} ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} ARG WSO2_OB_TOOLKIT_DIR=${WSO2_SERVER_HOME}/${WSO2_OB_TOOLKIT} @@ -75,7 +76,7 @@ RUN \ # read deployment.toml file ARG DEPLOYMENT_TOML_FILE=${WSO2_OB_TOOLKIT_DIR}/repository/resources/deployment.toml RUN \ - cp ${WSO2_OB_TOOLKIT_DIR}/repository/resources/${WSO2_SERVER}-deployment-uk.toml ${DEPLOYMENT_TOML_FILE} \ + cp ${WSO2_OB_TOOLKIT_DIR}/repository/resources/wso2is-5.11.0-deployment-uk.toml ${DEPLOYMENT_TOML_FILE} \ # configure hostnames && sed -i -e 's|IS_HOSTNAME|'${IS_HOSTNAME}'|g' ${DEPLOYMENT_TOML_FILE} \ && sed -i -e 's|APIM_HOSTNAME|'${APIM_HOSTNAME}'|g' ${DEPLOYMENT_TOML_FILE} \ diff --git a/dockerfiles/ubuntu/obiam-uk/README.md b/dockerfiles/ubuntu/obiam-uk/README.md index 3ee9de8..e7a7eef 100644 --- a/dockerfiles/ubuntu/obiam-uk/README.md +++ b/dockerfiles/ubuntu/obiam-uk/README.md @@ -1,11 +1,12 @@ # Dockerfile for WSO2 Open Banking Identity & Access Management UK Toolkit Module -This section defines the step-by-step instructions to build an [Ubuntu](https://hub.docker.com/_/ubuntu/) Linux based Docker image for WSO2 Open Banking Identity & Access Management UK Toolkit Module with WSO2 IS 5.11.0. +This section defines the step-by-step instructions to build an [Ubuntu](https://hub.docker.com/_/ubuntu/) Linux based Docker image for WSO2 Open Banking Identity & Access Management UK Toolkit Module with WSO2 IS 6.0.0. ## Prerequisites * [Docker](https://www.docker.com/get-docker) v20.10.10 or above * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client * WSO2 Open Banking Identity & Access Management UK Toolkit Module pack +* Download the WSO2 IS Connector to configure the Identity Server with the API Manager. Please go through this [link](https://ob.docs.wso2.com/en/latest/get-started/quick-start-guide/#installing-base-products) to find respective WSO2 IS Connector according to the API Manager version. Extract the dowloaded WSO2 IS Connector into your local machine. + Host the downloaded artifacts locally or on a remote location. > The hosted locations of artifacts will be passed as the build arguments when building the Docker image.
> 1. **WSO2_OB_TOOLKIT_DIST_URL** - UK Toolkit location @@ -24,13 +25,17 @@ git clone https://github.com/wso2/docker-open-banking.git - Navigate to `` directory.
Execute `docker build` command as shown below. - + `docker build --build-arg WSO2_OB_TOOLKIT_DIST_URL= -t wso2-obiam-uk:1.0.0 .`
- > eg:- **Hosted locally**: `docker build --build-arg WSO2_OB_TOOLKIT_DIST_URL=http://localhost:8000/wso2-obiam-toolkit-uk-1.0.0.tar.gz -t wso2-obiam-uk:1.0.0 .`

- > eg:- **Hosted remotely**: `docker build --build-arg WSO2_OB_TOOLKIT_DIST_URL=http:///wso2-obiam-toolkit-uk-1.0.0.tar.gz -t wso2-obiam-uk:1.0.0 .` + + `docker build --build-arg BASE_PRODUCT_VERSION= --build-arg WSO2_OB_TOOLKIT_DIST_URL= -t wso2-obiam-uk:1.0.0 .`
+ > eg:- **Hosted locally**: `docker build --build-arg BASE_PRODUCT_VERSION=6.0.0 --build-arg WSO2_OB_TOOLKIT_DIST_URL=http://localhost:8000/wso2-obiam-toolkit-uk-1.0.0.tar.gz -t wso2-obiam-uk:1.0.0 .`

+ > eg:- **Hosted remotely**: `docker build --build-arg BASE_PRODUCT_VERSION=6.0.0 --build-arg WSO2_OB_TOOLKIT_DIST_URL=http:///wso2-obiam-toolkit-uk-1.0.0.tar.gz -t wso2-obiam-uk:1.0.0 .` ##### 3. Running the Docker image. +if you are only using the WSO2 Open Banking Identity Server, please run the below command. +> - `docker run -it -p 9446:9446 wso2-obiam-uk:1.0.0` -- `docker run -it -p 9446:9446 wso2-obiam-uk:1.0.0` +If you are using WSO2 Open Banking Identity Server and WSO2 Open Banking API Manager, please run the below command. +> - `docker run -it -p 9446:9446 -v /dropins:/home/wso2carbon/wso2-artifact-volume/repository/components/dropins/ -v /webapps:/home/wso2carbon/wso2-artifact-volume/repository/deployment/server/webapps/ wso2-obiam-uk:1.0.0` +> In here, refers to the root directory path of the extracted WSO2 IS Connector. ##### 4. Accessing management console. @@ -65,7 +70,7 @@ docker run \ wso2-obiam-uk:1.0.0 ``` -> In here, refers to /home/wso2carbon/wso2is-5.11.0/repository/conf folder of the container. +> In here, refers to /home/wso2carbon/wso2is-6.0.0/repository/conf folder of the container. ## Docker command usage references