├── docker-compose ├── apim-with-mi │ ├── conf │ │ ├── mysql │ │ │ ├── conf │ │ │ │ └── my.cnf │ │ │ └── scripts │ │ │ │ └── z_health_check.sh │ │ ├── mi │ │ │ ├── repository │ │ │ │ └── resources │ │ │ │ │ └── security │ │ │ │ │ ├── wso2carbon.jks │ │ │ │ │ └── client-truststore.jks │ │ │ └── conf │ │ │ │ └── deployment.toml │ │ └── apim │ │ │ └── repository │ │ │ └── resources │ │ │ └── security │ │ │ ├── wso2carbon.jks │ │ │ └── client-truststore.jks │ ├── dockerfiles │ │ ├── mi │ │ │ ├── capps │ │ │ │ └── ServiceCatalogSampleCompositeExporter_1.0.0-SNAPSHOT.car │ │ │ └── Dockerfile │ │ └── apim │ │ │ └── Dockerfile │ ├── docker-compose.yml │ └── README.md ├── apim-with-analytics │ ├── conf │ │ └── mysql │ │ │ ├── conf │ │ │ └── my.cnf │ │ │ └── scripts │ │ │ └── z_health_check.sh │ ├── dockerfiles │ │ └── apim │ │ │ └── Dockerfile │ ├── docker-compose.yml │ └── README.md └── apim-is-as-km-with-analytics │ ├── conf │ ├── mysql │ │ ├── conf │ │ │ └── my.cnf │ │ └── scripts │ │ │ └── z_health_check.sh │ ├── apim │ │ └── repository │ │ │ └── resources │ │ │ └── security │ │ │ ├── wso2carbon.jks │ │ │ └── client-truststore.jks │ └── is-as-km │ │ └── repository │ │ ├── resources │ │ └── security │ │ │ ├── wso2carbon.jks │ │ │ └── client-truststore.jks │ │ └── conf │ │ └── deployment.toml │ ├── dockerfiles │ ├── is-as-km │ │ ├── webapps │ │ │ └── keymanager-operations.war │ │ ├── dropins │ │ │ ├── wso2is.key.manager.core-1.7.17.jar │ │ │ └── wso2is.notification.event.handlers-1.7.17.jar │ │ └── Dockerfile │ └── apim │ │ └── Dockerfile │ ├── docker-compose.yml │ └── README.md ├── .gitignore ├── issue_template.md ├── CHANGELOG.md ├── README.md ├── CONTRIBUTING.md ├── .github └── workflows │ └── docker-publish.yml ├── pull_request_template.md └── dockerfiles ├── alpine ├── apim │ ├── docker-entrypoint.sh │ ├── README.md │ └── Dockerfile ├── apim-tm │ ├── docker-entrypoint.sh │ ├── README.md │ └── Dockerfile ├── apim-universal-gw │ ├── docker-entrypoint.sh │ ├── README.md │ └── Dockerfile └── apim-acp │ ├── docker-entrypoint.sh │ ├── README.md │ └── Dockerfile ├── rocky ├── apim │ ├── docker-entrypoint.sh │ └── README.md ├── apim-tm │ ├── docker-entrypoint.sh │ ├── README.md │ └── Dockerfile ├── apim-universal-gw │ ├── docker-entrypoint.sh │ ├── README.md │ └── Dockerfile └── apim-acp │ ├── docker-entrypoint.sh │ ├── README.md │ └── Dockerfile ├── ubuntu ├── apim │ ├── docker-entrypoint.sh │ └── README.md ├── apim-tm │ ├── docker-entrypoint.sh │ └── README.md ├── apim-universal-gw │ ├── docker-entrypoint.sh │ └── README.md └── apim-acp │ ├── docker-entrypoint.sh │ └── README.md └── jdk17 ├── rocky └── apim │ ├── docker-entrypoint.sh │ └── Dockerfile ├── ubuntu └── apim │ ├── docker-entrypoint.sh │ └── README.md └── alpine └── apim ├── docker-entrypoint.sh ├── README.md └── Dockerfile /docker-compose/apim-with-mi/conf/mysql/conf/my.cnf: -------------------------------------------------------------------------------- 1 | !includedir /etc/mysql/conf.d/ 2 | !includedir /etc/mysql/mysql.conf.d/ 3 | [mysqld] 4 | max_connections=1000 5 | -------------------------------------------------------------------------------- /docker-compose/apim-with-analytics/conf/mysql/conf/my.cnf: -------------------------------------------------------------------------------- 1 | !includedir /etc/mysql/conf.d/ 2 | !includedir /etc/mysql/mysql.conf.d/ 3 | [mysqld] 4 | max_connections=1000 5 | -------------------------------------------------------------------------------- /docker-compose/apim-is-as-km-with-analytics/conf/mysql/conf/my.cnf: -------------------------------------------------------------------------------- 1 | !includedir /etc/mysql/conf.d/ 2 | !includedir /etc/mysql/mysql.conf.d/ 3 | [mysqld] 4 | max_connections=1000 5 | -------------------------------------------------------------------------------- /docker-compose/apim-with-mi/conf/mi/repository/resources/security/wso2carbon.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2/docker-apim/HEAD/docker-compose/apim-with-mi/conf/mi/repository/resources/security/wso2carbon.jks -------------------------------------------------------------------------------- /docker-compose/apim-with-mi/conf/apim/repository/resources/security/wso2carbon.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2/docker-apim/HEAD/docker-compose/apim-with-mi/conf/apim/repository/resources/security/wso2carbon.jks -------------------------------------------------------------------------------- /docker-compose/apim-with-mi/conf/mi/repository/resources/security/client-truststore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2/docker-apim/HEAD/docker-compose/apim-with-mi/conf/mi/repository/resources/security/client-truststore.jks -------------------------------------------------------------------------------- /docker-compose/apim-with-mi/conf/apim/repository/resources/security/client-truststore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2/docker-apim/HEAD/docker-compose/apim-with-mi/conf/apim/repository/resources/security/client-truststore.jks -------------------------------------------------------------------------------- /docker-compose/apim-is-as-km-with-analytics/conf/apim/repository/resources/security/wso2carbon.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2/docker-apim/HEAD/docker-compose/apim-is-as-km-with-analytics/conf/apim/repository/resources/security/wso2carbon.jks -------------------------------------------------------------------------------- /docker-compose/apim-is-as-km-with-analytics/dockerfiles/is-as-km/webapps/keymanager-operations.war: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2/docker-apim/HEAD/docker-compose/apim-is-as-km-with-analytics/dockerfiles/is-as-km/webapps/keymanager-operations.war -------------------------------------------------------------------------------- /docker-compose/apim-is-as-km-with-analytics/conf/is-as-km/repository/resources/security/wso2carbon.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2/docker-apim/HEAD/docker-compose/apim-is-as-km-with-analytics/conf/is-as-km/repository/resources/security/wso2carbon.jks -------------------------------------------------------------------------------- /docker-compose/apim-is-as-km-with-analytics/conf/apim/repository/resources/security/client-truststore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2/docker-apim/HEAD/docker-compose/apim-is-as-km-with-analytics/conf/apim/repository/resources/security/client-truststore.jks -------------------------------------------------------------------------------- /docker-compose/apim-with-mi/dockerfiles/mi/capps/ServiceCatalogSampleCompositeExporter_1.0.0-SNAPSHOT.car: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2/docker-apim/HEAD/docker-compose/apim-with-mi/dockerfiles/mi/capps/ServiceCatalogSampleCompositeExporter_1.0.0-SNAPSHOT.car -------------------------------------------------------------------------------- /docker-compose/apim-is-as-km-with-analytics/dockerfiles/is-as-km/dropins/wso2is.key.manager.core-1.7.17.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2/docker-apim/HEAD/docker-compose/apim-is-as-km-with-analytics/dockerfiles/is-as-km/dropins/wso2is.key.manager.core-1.7.17.jar -------------------------------------------------------------------------------- /docker-compose/apim-is-as-km-with-analytics/conf/is-as-km/repository/resources/security/client-truststore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2/docker-apim/HEAD/docker-compose/apim-is-as-km-with-analytics/conf/is-as-km/repository/resources/security/client-truststore.jks -------------------------------------------------------------------------------- /docker-compose/apim-is-as-km-with-analytics/dockerfiles/is-as-km/dropins/wso2is.notification.event.handlers-1.7.17.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wso2/docker-apim/HEAD/docker-compose/apim-is-as-km-with-analytics/dockerfiles/is-as-km/dropins/wso2is.notification.event.handlers-1.7.17.jar -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.class 3 | 4 | # Mobile Tools for Java (J2ME) 5 | .mtj.tmp/ 6 | 7 | # Package Files # 8 | *.jar 9 | !docker-compose/apim-is-as-km-with-analytics/dockerfiles/is-as-km/dropins/*.jar 10 | *.war 11 | !docker-compose/apim-is-as-km-with-analytics/dockerfiles/is-as-km/webapps/*.war 12 | *.ear 13 | 14 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 15 | hs_err_pid* 16 | 17 | # any packs that would be included 18 | *.exe 19 | *.tar.gz 20 | *.zip 21 | 22 | # IntelliJ IDEA 23 | .idea/ 24 | *.iml 25 | 26 | # macOS 27 | .DS_Store 28 | 29 | rat.txt 30 | 31 | # exclude everything 32 | **/files/* 33 | 34 | # exception to the rule 35 | !**/files/.gitkeep 36 | -------------------------------------------------------------------------------- /issue_template.md: -------------------------------------------------------------------------------- 1 | **Description:** 2 | 3 | 4 | **Suggested Labels:** 5 | 6 | 7 | **Suggested Assignees:** 8 | 9 | 10 | **Affected Product Version:** 11 | 12 | **OS, DB, other environment details and versions:** 13 | 14 | **Steps to reproduce:** 15 | 16 | 17 | **Related Issues:** 18 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to Docker and Docker Compose resources for WSO2 API Management version `4.5.x` in each resource release, will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). 6 | 7 | ## [v4.5.0.1] - 2025-03-06 8 | 9 | ### Changed 10 | - Update all Docker resources to support WSO2 API Manager version `4.5.0`. 11 | - Introduce new Docker images for each component. Now we have four Docker images: Gateway, API Control Plane, Traffic Manager, and All-in-One. 12 | - Update all Docker Compose resources to support WSO2 API Manager version `4.5.0`. 13 | - Update Docker Compose resources for the deployment of WSO2 APIM with MI to support Micro Integrator version `4.4.0.0`. 14 | - Update IS extentions to the latest version and mount wso2carbon and client-truststore keystores with the latest wso2carbon certificate in Identity Server as Key Manager with Choreo Analytics deployment setup. 15 | -------------------------------------------------------------------------------- /docker-compose/apim-with-mi/conf/mysql/scripts/z_health_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ------------------------------------------------------------------------ 4 | # 5 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License 18 | # 19 | # ------------------------------------------------------------------------ 20 | 21 | # Create a flag file to indicate initialization is complete 22 | touch /var/lib/mysql/initialization-complete.flag 23 | -------------------------------------------------------------------------------- /docker-compose/apim-with-analytics/conf/mysql/scripts/z_health_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ------------------------------------------------------------------------ 4 | # 5 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License 18 | # 19 | # ------------------------------------------------------------------------ 20 | 21 | # Create a flag file to indicate initialization is complete 22 | touch /var/lib/mysql/initialization-complete.flag 23 | -------------------------------------------------------------------------------- /docker-compose/apim-is-as-km-with-analytics/conf/mysql/scripts/z_health_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ------------------------------------------------------------------------ 4 | # 5 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License 18 | # 19 | # ------------------------------------------------------------------------ 20 | 21 | # Create a flag file to indicate initialization is complete 22 | touch /var/lib/mysql/initialization-complete.flag 23 | -------------------------------------------------------------------------------- /docker-compose/apim-with-mi/dockerfiles/mi/Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2021 WSO2, Inc. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # 17 | # ------------------------------------------------------------------------ 18 | 19 | FROM docker.wso2.com/wso2mi:4.5.0.0 20 | LABEL maintainer="WSO2 Docker Maintainers " 21 | 22 | # copy CAR files to the MI server home 23 | COPY capps ${WSO2_SERVER_HOME}/repository/deployment/server/carbonapps/ 24 | -------------------------------------------------------------------------------- /docker-compose/apim-is-as-km-with-analytics/dockerfiles/apim/Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2020 WSO2, Inc. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # 17 | # ------------------------------------------------------------------------ 18 | 19 | # set base Docker image to WSO2 API Manager Docker image with latest WSO2 Updates 20 | 21 | FROM docker.wso2.com/wso2am:4.6.0.0 22 | 23 | LABEL maintainer="WSO2 Docker Maintainers " 24 | 25 | ARG MYSQL_CONNECTOR_VERSION=8.0.30 26 | 27 | # add MySQL JDBC connector to server home as a third party library 28 | ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins/ 29 | -------------------------------------------------------------------------------- /docker-compose/apim-with-mi/dockerfiles/apim/Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2021 WSO2, Inc. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # 17 | # ------------------------------------------------------------------------ 18 | 19 | # set base Docker image to WSO2 API Manager Docker image with latest WSO2 Updates 20 | FROM docker.wso2.com/wso2am:4.6.0.0 21 | LABEL maintainer="WSO2 Docker Maintainers " 22 | 23 | # build arguments for external artifacts 24 | ARG MYSQL_CONNECTOR_VERSION=8.0.30 25 | 26 | # add MySQL JDBC connector to server home as a third party library 27 | ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins/ 28 | -------------------------------------------------------------------------------- /docker-compose/apim-with-analytics/dockerfiles/apim/Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2020 WSO2, Inc. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # 17 | # ------------------------------------------------------------------------ 18 | 19 | # set base Docker image to WSO2 API Manager Docker image with latest WSO2 Updates 20 | FROM docker.wso2.com/wso2am:4.6.0.0 21 | LABEL maintainer="WSO2 Docker Maintainers " 22 | 23 | # build arguments for external artifacts 24 | ARG MYSQL_CONNECTOR_VERSION=8.0.30 25 | 26 | # add MySQL JDBC connector to server home as a third party library 27 | ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins/ 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker and Docker Compose Resources for WSO2 API Management 2 | 3 | This repository contains following Docker resources: 4 | 5 | - Alpine, Rocky Linux and Ubuntu based Docker resources for WSO2 API Manager, Identity Server as Key Manager, and 6 | Micro Integrator profiles. 7 | 8 | - Docker Compose resources for the most common WSO2 API Management deployment patterns 9 | 10 | Docker resources for WSO2 API Manager, WSO2 Identity Server as Key Manager, and WSO2 Micro Integrator 11 | help you build generic Docker images for deploying the corresponding product servers in containerized environments. 12 | 13 | Each Docker image includes the Java Development Kit, the relevant product distribution and a collection of utility libraries. 14 | Configurations and non-configuration resources (e.g. binaries such as, third-party libraries, Carbon extensions, 15 | Carbon Applications and security related artifacts such as, Java Keystore files) are designed to be provided via 16 | volume mounts to the containers spawned. 17 | 18 | Docker Compose files have been created according to the most common API Management deployment patterns available for allowing users 19 | to quickly evaluate product features along side their co-operate API Management requirements. The Compose files make use of per profile 20 | Docker images of WSO2 API Manager, WSO2 Identity Server as Key Manager, and Micro Integrator as well as MySQL. 21 | 22 | **Change log** from previous v4.2.0.1 release: [View Here](https://github.com/wso2/docker-apim/blob/4.2.x/CHANGELOG.md) 23 | -------------------------------------------------------------------------------- /docker-compose/apim-is-as-km-with-analytics/dockerfiles/is-as-km/Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2020 WSO2, Inc. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # 17 | # ------------------------------------------------------------------------ 18 | 19 | # set base Docker image to WSO2 API Manager Docker image with latest WSO2 Updates 20 | FROM docker.wso2.com/wso2is:6.1.0.0 21 | LABEL maintainer="WSO2 Docker Maintainers " 22 | 23 | ARG MYSQL_CONNECTOR_VERSION=8.0.30 24 | # copy extensions to the identity server home 25 | COPY dropins ${WSO2_SERVER_HOME}/repository/components/dropins/ 26 | # copy customized webapps to the identity server home 27 | COPY webapps ${WSO2_SERVER_HOME}/repository/deployment/server/webapps/ 28 | 29 | # add MySQL JDBC connector to server home as a third party library 30 | ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/lib/ 31 | -------------------------------------------------------------------------------- /docker-compose/apim-with-analytics/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | version: '2.4' 16 | services: 17 | mysql: 18 | image: mysql:8.0.36 19 | ports: 20 | - 3306 21 | environment: 22 | MYSQL_ROOT_PASSWORD: root 23 | volumes: 24 | - ./conf/mysql/scripts:/docker-entrypoint-initdb.d 25 | - ./conf/mysql/conf/my.cnf:/etc/mysql/mysql.conf.d/my.cnf 26 | ulimits: 27 | nofile: 28 | soft: 20000 29 | hard: 40000 30 | command: [--ssl=0] 31 | healthcheck: 32 | test: ["CMD", "sh", "-c", "mysqladmin ping -uroot -proot && [ -f /var/lib/mysql/initialization-complete.flag ]"] 33 | interval: 30s 34 | timeout: 60s 35 | retries: 5 36 | start_period: 80s 37 | api-manager: 38 | build: ./dockerfiles/apim 39 | healthcheck: 40 | test: ["CMD", "curl", "--fail", "http://localhost:9763/services/Version"] 41 | interval: 10s 42 | start_period: 180s 43 | retries: 20 44 | depends_on: 45 | mysql: 46 | condition: service_healthy 47 | volumes: 48 | - ./conf/apim:/home/wso2carbon/wso2-config-volume 49 | ports: 50 | - "9443:9443" 51 | - "8280:8280" 52 | - "8243:8243" 53 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to docker-apim 2 | 3 | Docker and Docker Compose resources for WSO2 API Management platform are open source and we encourage contributions from our community. 4 | 5 | ## How you can Contribute 6 | 7 | ### Mailing Lists 8 | 9 | The recommended way to discuss anything related to WSO2 products is via our mailing lists. First, go to https://wso2.com/mail/ and subscribe to any mailing lists. Here are the two most popular lists: 10 | 11 | * dev@wso2.org: To discuss all WSO2 products. 12 | * architecture@wso2.org: To discuss the architecture of WSO2 products. 13 | 14 | ### Posting Issues 15 | 16 | We encourage you to report any problems in the WSO2 product Docker and Docker Compose resources or their documentation by creating GitHub issues in the respective repositories. 17 | The issues page on GitHub is for tracking bugs and feature requests. When posing a new issue, follow the guidelines below. 18 | 19 | * Check whether the issue has already been reported. 20 | * Create a separate issue for each bug you are reporting or feature you are requesting. 21 | 22 | ### Code Contributions 23 | 24 | If you like to contribute with a bug fix or a new feature, start by posting an issue and discussing the best way to implement it. 25 | 26 | Unlike most projects, development for this repository is carried out on the `4.3.x` branch. This is because the `master` branch contains the latest stable release of the project. 27 | The code in `4.3.x` is merged to the `master` branch after a final review and a round of testing. 28 | 29 | Please follow these guidelines when contributing to the code: 30 | 31 | 1. Fork the current repository. 32 | 2. Create a topic branch from the `4.3.x` branch. 33 | 3. Make commits in logical units. 34 | 4. Before you send out the pull request, sync your forked repository with a remote repository. This makes your pull request simple and clear. 35 | 36 | ```bash 37 | git clone https://github.com//docker-apim.git 38 | git remote add upstream https://github.com/wso2/docker-apim.git 39 | git fetch upstream 40 | git checkout -b upstream/4.3.x 41 | 42 | # add some work 43 | 44 | git push origin 45 | 46 | # submit pull request 47 | ``` 48 | 49 | **Thanks for contributing!** 50 | -------------------------------------------------------------------------------- /docker-compose/apim-with-mi/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | version: '2.4' 16 | services: 17 | mysql: 18 | image: mysql:8.0.36 19 | ports: 20 | - 3306 21 | environment: 22 | MYSQL_ROOT_PASSWORD: root 23 | volumes: 24 | - ./conf/mysql/scripts:/docker-entrypoint-initdb.d 25 | - ./conf/mysql/conf/my.cnf:/etc/mysql/mysql.conf.d/my.cnf 26 | ulimits: 27 | nofile: 28 | soft: 20000 29 | hard: 40000 30 | command: [--ssl=0] 31 | healthcheck: 32 | test: ["CMD", "sh", "-c", "mysqladmin ping -uroot -proot && [ -f /var/lib/mysql/initialization-complete.flag ]"] 33 | interval: 30s 34 | timeout: 60s 35 | retries: 5 36 | start_period: 80s 37 | api-manager: 38 | build: ./dockerfiles/apim 39 | healthcheck: 40 | test: ["CMD", "curl", "--fail", "http://localhost:9763/services/Version"] 41 | interval: 10s 42 | start_period: 180s 43 | retries: 20 44 | depends_on: 45 | mysql: 46 | condition: service_healthy 47 | volumes: 48 | - ./conf/apim:/home/wso2carbon/wso2-config-volume 49 | ports: 50 | - "9443:9443" 51 | - "8280:8280" 52 | - "8243:8243" 53 | micro-integrator: 54 | build: ./dockerfiles/mi 55 | healthcheck: 56 | test: ["CMD", "nc", "-z", "localhost", "8253"] 57 | interval: 10s 58 | start_period: 30s 59 | retries: 10 60 | depends_on: 61 | mysql: 62 | condition: service_healthy 63 | api-manager: 64 | condition: service_healthy 65 | volumes: 66 | - ./conf/mi:/home/wso2carbon/wso2-config-volume 67 | ports: 68 | - "8290:8290" 69 | - "8253:8253" 70 | -------------------------------------------------------------------------------- /docker-compose/apim-is-as-km-with-analytics/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | version: '2.4' 16 | services: 17 | mysql: 18 | image: mysql:8.0.36 19 | ports: 20 | - 3306 21 | environment: 22 | MYSQL_ROOT_PASSWORD: root 23 | volumes: 24 | - ./conf/mysql/scripts:/docker-entrypoint-initdb.d 25 | - ./conf/mysql/conf/my.cnf:/etc/mysql/mysql.conf.d/my.cnf 26 | ulimits: 27 | nofile: 28 | soft: 20000 29 | hard: 40000 30 | command: [--ssl=0] 31 | healthcheck: 32 | test: ["CMD", "sh", "-c", "mysqladmin ping -uroot -proot && [ -f /var/lib/mysql/initialization-complete.flag ]"] 33 | interval: 30s 34 | timeout: 60s 35 | retries: 5 36 | start_period: 80s 37 | is-as-km: 38 | build: ./dockerfiles/is-as-km 39 | healthcheck: 40 | test: ["CMD", "curl", "--fail", "https://localhost:9444/api/health-check/v1.0/health"] 41 | interval: 10s 42 | start_period: 180s 43 | retries: 20 44 | depends_on: 45 | mysql: 46 | condition: service_healthy 47 | volumes: 48 | - ./conf/is-as-km:/home/wso2carbon/wso2-config-volume 49 | ports: 50 | - "9444:9444" 51 | api-manager: 52 | build: ./dockerfiles/apim 53 | healthcheck: 54 | test: ["CMD", "curl", "--fail", "http://localhost:9763/services/Version"] 55 | interval: 10s 56 | start_period: 180s 57 | retries: 20 58 | depends_on: 59 | mysql: 60 | condition: service_healthy 61 | is-as-km: 62 | condition: service_healthy 63 | volumes: 64 | - ./conf/apim:/home/wso2carbon/wso2-config-volume 65 | ports: 66 | - "9443:9443" 67 | - "8280:8280" 68 | - "8243:8243" 69 | -------------------------------------------------------------------------------- /.github/workflows/docker-publish.yml: -------------------------------------------------------------------------------- 1 | name: Docker image Pipeline 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | os: 7 | description: 'Operating System' 8 | required: true 9 | default: 'ubuntu' 10 | type: choice 11 | options: 12 | - ubuntu 13 | - alpine 14 | - rocky 15 | component: 16 | description: 'Component' 17 | required: true 18 | default: 'apim' 19 | type: choice 20 | options: 21 | - apim 22 | - apim-acp 23 | - apim-universal-gw 24 | - apim-tm 25 | tag: 26 | description: 'Docker image tag' 27 | required: true 28 | default: 'wso2/wso2am:latest' 29 | product_version: 30 | description: 'Product version' 31 | required: true 32 | zip_version: 33 | description: 'ZIP file version (if different from product version)' 34 | required: false 35 | product_zip_file: 36 | description: 'Product zip file' 37 | required: true 38 | product_distribution_name: 39 | description: 'Product distribution name' 40 | required: true 41 | platforms: 42 | description: 'Platforms for multi-arch build' 43 | required: true 44 | type: string 45 | default: 'linux/amd64,linux/arm64' 46 | 47 | jobs: 48 | build: 49 | runs-on: ubuntu-latest 50 | 51 | steps: 52 | - name: Checkout repository 53 | uses: actions/checkout@v4 54 | with: 55 | repository: wso2/docker-apim 56 | ref: master 57 | 58 | - name: Set up Docker Buildx 59 | uses: docker/setup-buildx-action@v3 60 | 61 | - name: Login to DockerHub 62 | uses: docker/login-action@v3 63 | with: 64 | username: ${{ secrets.DOCKER_USERNAME }} 65 | password: ${{ secrets.DOCKER_PASSWORD }} 66 | 67 | - name: Build and push Docker image 68 | uses: docker/build-push-action@v5 69 | with: 70 | context: dockerfiles/${{ github.event.inputs.os }}/${{ github.event.inputs.component }} 71 | file: dockerfiles/${{ github.event.inputs.os }}/${{ github.event.inputs.component }}/Dockerfile 72 | platforms: ${{ github.event.inputs.platforms }} 73 | push: true 74 | tags: ${{ github.event.inputs.tag }} 75 | build-args: | 76 | WSO2_SERVER_DIST_URL=${{ github.event.inputs.product_zip_file }} 77 | WSO2_SERVER_VERSION=${{ github.event.inputs.product_version }} 78 | WSO2_SERVER_ZIP_VERSION=${{ github.event.inputs.zip_version || github.event.inputs.product_version }} 79 | WSO2_SERVER=${{ github.event.inputs.product_distribution_name }} 80 | -------------------------------------------------------------------------------- /pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Purpose 2 | > Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc. 3 | 4 | ## Goals 5 | > Describe the solutions that this feature/fix will introduce to resolve the problems described above 6 | 7 | ## Approach 8 | > Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here. 9 | 10 | ## User stories 11 | > Summary of user stories addressed by this change> 12 | 13 | ## Release note 14 | > Brief description of the new feature or bug fix as it will appear in the release notes 15 | 16 | ## Documentation 17 | > Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact 18 | 19 | ## Training 20 | > Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable 21 | 22 | ## Certification 23 | > Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why. 24 | 25 | ## Marketing 26 | > Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable 27 | 28 | ## Automation tests 29 | - Unit tests 30 | > Code coverage information 31 | - Integration tests 32 | > Details about the test cases and coverage 33 | 34 | ## Security checks 35 | - Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes/no 36 | - Ran FindSecurityBugs plugin and verified report? yes/no 37 | - Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes/no 38 | 39 | ## Samples 40 | > Provide high-level details about the samples related to this feature 41 | 42 | ## Related PRs 43 | > List any other related PRs 44 | 45 | ## Migrations (if applicable) 46 | > Describe migration steps and platforms on which migration has been tested 47 | 48 | ## Test environment 49 | > List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested 50 | 51 | ## Learning 52 | > Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem. -------------------------------------------------------------------------------- /dockerfiles/alpine/apim/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # Copyright 2023 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # ------------------------------------------------------------------------ 17 | 18 | set -e 19 | 20 | # volume mounts 21 | config_volume=${WORKING_DIRECTORY}/wso2-config-volume 22 | artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume 23 | # home of the directories to be artifact synced within the WSO2 product home 24 | deployment_volume=${WSO2_SERVER_HOME}/repository/deployment/server 25 | # home of the directories with preserved, default deployment artifacts 26 | original_deployment_artifacts=${WORKING_DIRECTORY}/wso2-tmp 27 | 28 | # check if the WSO2 non-root user home exists 29 | test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 30 | 31 | # check if the WSO2 product home exists 32 | test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 33 | 34 | # shared artifact directories 35 | directories=("executionplans" "synapse-configs") 36 | # if the original directory locations of artifacts to be synced between nodes are empty, 37 | # copy the preserved, default content of these folders to these original locations 38 | for shared_directory in ${directories[@]}; do 39 | if test -d ${original_deployment_artifacts}/${shared_directory}; 40 | then 41 | if [[ -z "$(ls -A ${deployment_volume}/${shared_directory})" ]]; then 42 | if ! cp -R ${original_deployment_artifacts}/${shared_directory}/* ${deployment_volume}/${shared_directory}; 43 | then 44 | echo "Failed to copy the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 45 | exit 1 46 | fi 47 | echo "Successfully copied the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 48 | fi 49 | fi 50 | done 51 | 52 | # copy any configuration changes mounted to config_volume 53 | test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ 54 | # copy any artifact changes mounted to artifact_volume 55 | test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ 56 | 57 | # start WSO2 Carbon server 58 | echo "Start WSO2 Carbon server" >&2 59 | sh ${WSO2_SERVER_HOME}/bin/api-manager.sh "$@" 60 | -------------------------------------------------------------------------------- /dockerfiles/rocky/apim/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # Copyright 2023 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # ------------------------------------------------------------------------ 17 | 18 | set -e 19 | 20 | # volume mounts 21 | config_volume=${WORKING_DIRECTORY}/wso2-config-volume 22 | artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume 23 | # home of the directories to be artifact synced within the WSO2 product home 24 | deployment_volume=${WSO2_SERVER_HOME}/repository/deployment/server 25 | # home of the directories with preserved, default deployment artifacts 26 | original_deployment_artifacts=${WORKING_DIRECTORY}/wso2-tmp 27 | 28 | # check if the WSO2 non-root user home exists 29 | test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 30 | 31 | # check if the WSO2 product home exists 32 | test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 33 | 34 | # shared artifact directories 35 | directories=("executionplans" "synapse-configs") 36 | # if the original directory locations of artifacts to be synced between nodes are empty, 37 | # copy the preserved, default content of these folders to these original locations 38 | for shared_directory in ${directories[@]}; do 39 | if test -d ${original_deployment_artifacts}/${shared_directory}; 40 | then 41 | if [[ -z "$(ls -A ${deployment_volume}/${shared_directory})" ]]; then 42 | if ! cp -R ${original_deployment_artifacts}/${shared_directory}/* ${deployment_volume}/${shared_directory}; 43 | then 44 | echo "Failed to copy the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 45 | exit 1 46 | fi 47 | echo "Successfully copied the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 48 | fi 49 | fi 50 | done 51 | 52 | # copy any configuration changes mounted to config_volume 53 | test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ 54 | # copy any artifact changes mounted to artifact_volume 55 | test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ 56 | 57 | # start WSO2 Carbon server 58 | echo "Start WSO2 Carbon server" >&2 59 | sh ${WSO2_SERVER_HOME}/bin/api-manager.sh "$@" 60 | -------------------------------------------------------------------------------- /dockerfiles/ubuntu/apim/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # Copyright 2023 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # ------------------------------------------------------------------------ 17 | 18 | set -e 19 | 20 | # volume mounts 21 | config_volume=${WORKING_DIRECTORY}/wso2-config-volume 22 | artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume 23 | # home of the directories to be artifact synced within the WSO2 product home 24 | deployment_volume=${WSO2_SERVER_HOME}/repository/deployment/server 25 | # home of the directories with preserved, default deployment artifacts 26 | original_deployment_artifacts=${WORKING_DIRECTORY}/wso2-tmp 27 | 28 | # check if the WSO2 non-root user home exists 29 | test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 30 | 31 | # check if the WSO2 product home exists 32 | test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 33 | 34 | # shared artifact directories 35 | directories=("executionplans" "synapse-configs") 36 | # if the original directory locations of artifacts to be synced between nodes are empty, 37 | # copy the preserved, default content of these folders to these original locations 38 | for shared_directory in ${directories[@]}; do 39 | if test -d ${original_deployment_artifacts}/${shared_directory}; 40 | then 41 | if [[ -z "$(ls -A ${deployment_volume}/${shared_directory})" ]]; then 42 | if ! cp -R ${original_deployment_artifacts}/${shared_directory}/* ${deployment_volume}/${shared_directory}; 43 | then 44 | echo "Failed to copy the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 45 | exit 1 46 | fi 47 | echo "Successfully copied the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 48 | fi 49 | fi 50 | done 51 | 52 | # copy any configuration changes mounted to config_volume 53 | test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ 54 | # copy any artifact changes mounted to artifact_volume 55 | test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ 56 | 57 | # start WSO2 Carbon server 58 | echo "Start WSO2 Carbon server" >&2 59 | sh ${WSO2_SERVER_HOME}/bin/api-manager.sh "$@" 60 | -------------------------------------------------------------------------------- /dockerfiles/alpine/apim-tm/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # ------------------------------------------------------------------------ 17 | 18 | set -e 19 | 20 | # volume mounts 21 | config_volume=${WORKING_DIRECTORY}/wso2-config-volume 22 | artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume 23 | # home of the directories to be artifact synced within the WSO2 product home 24 | deployment_volume=${WSO2_SERVER_HOME}/repository/deployment/server 25 | # home of the directories with preserved, default deployment artifacts 26 | original_deployment_artifacts=${WORKING_DIRECTORY}/wso2-tmp 27 | 28 | # check if the WSO2 non-root user home exists 29 | test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 30 | 31 | # check if the WSO2 product home exists 32 | test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 33 | 34 | # shared artifact directories 35 | directories=("executionplans" "synapse-configs") 36 | # if the original directory locations of artifacts to be synced between nodes are empty, 37 | # copy the preserved, default content of these folders to these original locations 38 | for shared_directory in ${directories[@]}; do 39 | if test -d ${original_deployment_artifacts}/${shared_directory}; 40 | then 41 | if [[ -z "$(ls -A ${deployment_volume}/${shared_directory})" ]]; then 42 | if ! cp -R ${original_deployment_artifacts}/${shared_directory}/* ${deployment_volume}/${shared_directory}; 43 | then 44 | echo "Failed to copy the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 45 | exit 1 46 | fi 47 | echo "Successfully copied the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 48 | fi 49 | fi 50 | done 51 | 52 | # copy any configuration changes mounted to config_volume 53 | test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ 54 | # copy any artifact changes mounted to artifact_volume 55 | test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ 56 | 57 | # start WSO2 Carbon server 58 | echo "Start WSO2 Carbon server" >&2 59 | sh ${WSO2_SERVER_HOME}/bin/traffic-manager.sh "$@" 60 | -------------------------------------------------------------------------------- /dockerfiles/jdk17/rocky/apim/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # Copyright 2018 WSO2, Inc. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # ------------------------------------------------------------------------ 17 | 18 | set -e 19 | 20 | # volume mounts 21 | config_volume=${WORKING_DIRECTORY}/wso2-config-volume 22 | artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume 23 | # home of the directories to be artifact synced within the WSO2 product home 24 | deployment_volume=${WSO2_SERVER_HOME}/repository/deployment/server 25 | # home of the directories with preserved, default deployment artifacts 26 | original_deployment_artifacts=${WORKING_DIRECTORY}/wso2-tmp 27 | 28 | # check if the WSO2 non-root user home exists 29 | test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 30 | 31 | # check if the WSO2 product home exists 32 | test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 33 | 34 | # shared artifact directories 35 | directories=("executionplans" "synapse-configs") 36 | # if the original directory locations of artifacts to be synced between nodes are empty, 37 | # copy the preserved, default content of these folders to these original locations 38 | for shared_directory in ${directories[@]}; do 39 | if test -d ${original_deployment_artifacts}/${shared_directory}; 40 | then 41 | if [[ -z "$(ls -A ${deployment_volume}/${shared_directory})" ]]; then 42 | if ! cp -R ${original_deployment_artifacts}/${shared_directory}/* ${deployment_volume}/${shared_directory}; 43 | then 44 | echo "Failed to copy the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 45 | exit 1 46 | fi 47 | echo "Successfully copied the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 48 | fi 49 | fi 50 | done 51 | 52 | # copy any configuration changes mounted to config_volume 53 | test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ 54 | # copy any artifact changes mounted to artifact_volume 55 | test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ 56 | 57 | # start WSO2 Carbon server 58 | echo "Start WSO2 Carbon server" >&2 59 | sh ${WSO2_SERVER_HOME}/bin/api-manager.sh "$@" 60 | -------------------------------------------------------------------------------- /dockerfiles/jdk17/ubuntu/apim/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # Copyright 2018 WSO2, Inc. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # ------------------------------------------------------------------------ 17 | 18 | set -e 19 | 20 | # volume mounts 21 | config_volume=${WORKING_DIRECTORY}/wso2-config-volume 22 | artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume 23 | # home of the directories to be artifact synced within the WSO2 product home 24 | deployment_volume=${WSO2_SERVER_HOME}/repository/deployment/server 25 | # home of the directories with preserved, default deployment artifacts 26 | original_deployment_artifacts=${WORKING_DIRECTORY}/wso2-tmp 27 | 28 | # check if the WSO2 non-root user home exists 29 | test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 30 | 31 | # check if the WSO2 product home exists 32 | test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 33 | 34 | # shared artifact directories 35 | directories=("executionplans" "synapse-configs") 36 | # if the original directory locations of artifacts to be synced between nodes are empty, 37 | # copy the preserved, default content of these folders to these original locations 38 | for shared_directory in ${directories[@]}; do 39 | if test -d ${original_deployment_artifacts}/${shared_directory}; 40 | then 41 | if [[ -z "$(ls -A ${deployment_volume}/${shared_directory})" ]]; then 42 | if ! cp -R ${original_deployment_artifacts}/${shared_directory}/* ${deployment_volume}/${shared_directory}; 43 | then 44 | echo "Failed to copy the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 45 | exit 1 46 | fi 47 | echo "Successfully copied the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 48 | fi 49 | fi 50 | done 51 | 52 | # copy any configuration changes mounted to config_volume 53 | test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ 54 | # copy any artifact changes mounted to artifact_volume 55 | test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ 56 | 57 | # start WSO2 Carbon server 58 | echo "Start WSO2 Carbon server" >&2 59 | sh ${WSO2_SERVER_HOME}/bin/api-manager.sh "$@" 60 | -------------------------------------------------------------------------------- /dockerfiles/rocky/apim-tm/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # ------------------------------------------------------------------------ 17 | 18 | set -e 19 | 20 | # volume mounts 21 | config_volume=${WORKING_DIRECTORY}/wso2-config-volume 22 | artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume 23 | # home of the directories to be artifact synced within the WSO2 product home 24 | deployment_volume=${WSO2_SERVER_HOME}/repository/deployment/server 25 | # home of the directories with preserved, default deployment artifacts 26 | original_deployment_artifacts=${WORKING_DIRECTORY}/wso2-tmp 27 | 28 | # check if the WSO2 non-root user home exists 29 | test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 30 | 31 | # check if the WSO2 product home exists 32 | test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 33 | 34 | # shared artifact directories 35 | directories=("executionplans" "synapse-configs") 36 | # if the original directory locations of artifacts to be synced between nodes are empty, 37 | # copy the preserved, default content of these folders to these original locations 38 | for shared_directory in ${directories[@]}; do 39 | if test -d ${original_deployment_artifacts}/${shared_directory}; 40 | then 41 | if [[ -z "$(ls -A ${deployment_volume}/${shared_directory})" ]]; then 42 | if ! cp -R ${original_deployment_artifacts}/${shared_directory}/* ${deployment_volume}/${shared_directory}; 43 | then 44 | echo "Failed to copy the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 45 | exit 1 46 | fi 47 | echo "Successfully copied the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 48 | fi 49 | fi 50 | done 51 | 52 | # copy any configuration changes mounted to config_volume 53 | test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ 54 | # copy any artifact changes mounted to artifact_volume 55 | test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ 56 | 57 | # start WSO2 Carbon server 58 | echo "Start WSO2 Carbon server" >&2 59 | sh ${WSO2_SERVER_HOME}/bin/traffic-manager.sh "$@" 60 | -------------------------------------------------------------------------------- /dockerfiles/rocky/apim-universal-gw/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # ------------------------------------------------------------------------ 17 | 18 | set -e 19 | 20 | # volume mounts 21 | config_volume=${WORKING_DIRECTORY}/wso2-config-volume 22 | artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume 23 | # home of the directories to be artifact synced within the WSO2 product home 24 | deployment_volume=${WSO2_SERVER_HOME}/repository/deployment/server 25 | # home of the directories with preserved, default deployment artifacts 26 | original_deployment_artifacts=${WORKING_DIRECTORY}/wso2-tmp 27 | 28 | # check if the WSO2 non-root user home exists 29 | test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 30 | 31 | # check if the WSO2 product home exists 32 | test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 33 | 34 | # shared artifact directories 35 | directories=("executionplans" "synapse-configs") 36 | # if the original directory locations of artifacts to be synced between nodes are empty, 37 | # copy the preserved, default content of these folders to these original locations 38 | for shared_directory in ${directories[@]}; do 39 | if test -d ${original_deployment_artifacts}/${shared_directory}; 40 | then 41 | if [[ -z "$(ls -A ${deployment_volume}/${shared_directory})" ]]; then 42 | if ! cp -R ${original_deployment_artifacts}/${shared_directory}/* ${deployment_volume}/${shared_directory}; 43 | then 44 | echo "Failed to copy the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 45 | exit 1 46 | fi 47 | echo "Successfully copied the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 48 | fi 49 | fi 50 | done 51 | 52 | # copy any configuration changes mounted to config_volume 53 | test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ 54 | # copy any artifact changes mounted to artifact_volume 55 | test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ 56 | 57 | # start WSO2 Carbon server 58 | echo "Start WSO2 Carbon server" >&2 59 | sh ${WSO2_SERVER_HOME}/bin/gateway.sh "$@" 60 | -------------------------------------------------------------------------------- /dockerfiles/ubuntu/apim-tm/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # ------------------------------------------------------------------------ 17 | 18 | set -e 19 | 20 | # volume mounts 21 | config_volume=${WORKING_DIRECTORY}/wso2-config-volume 22 | artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume 23 | # home of the directories to be artifact synced within the WSO2 product home 24 | deployment_volume=${WSO2_SERVER_HOME}/repository/deployment/server 25 | # home of the directories with preserved, default deployment artifacts 26 | original_deployment_artifacts=${WORKING_DIRECTORY}/wso2-tmp 27 | 28 | # check if the WSO2 non-root user home exists 29 | test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 30 | 31 | # check if the WSO2 product home exists 32 | test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 33 | 34 | # shared artifact directories 35 | directories=("executionplans" "synapse-configs") 36 | # if the original directory locations of artifacts to be synced between nodes are empty, 37 | # copy the preserved, default content of these folders to these original locations 38 | for shared_directory in ${directories[@]}; do 39 | if test -d ${original_deployment_artifacts}/${shared_directory}; 40 | then 41 | if [[ -z "$(ls -A ${deployment_volume}/${shared_directory})" ]]; then 42 | if ! cp -R ${original_deployment_artifacts}/${shared_directory}/* ${deployment_volume}/${shared_directory}; 43 | then 44 | echo "Failed to copy the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 45 | exit 1 46 | fi 47 | echo "Successfully copied the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 48 | fi 49 | fi 50 | done 51 | 52 | # copy any configuration changes mounted to config_volume 53 | test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ 54 | # copy any artifact changes mounted to artifact_volume 55 | test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ 56 | 57 | # start WSO2 Carbon server 58 | echo "Start WSO2 Carbon server" >&2 59 | sh ${WSO2_SERVER_HOME}/bin/traffic-manager.sh "$@" 60 | -------------------------------------------------------------------------------- /dockerfiles/alpine/apim-universal-gw/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # ------------------------------------------------------------------------ 17 | 18 | set -e 19 | 20 | # volume mounts 21 | config_volume=${WORKING_DIRECTORY}/wso2-config-volume 22 | artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume 23 | # home of the directories to be artifact synced within the WSO2 product home 24 | deployment_volume=${WSO2_SERVER_HOME}/repository/deployment/server 25 | # home of the directories with preserved, default deployment artifacts 26 | original_deployment_artifacts=${WORKING_DIRECTORY}/wso2-tmp 27 | 28 | # check if the WSO2 non-root user home exists 29 | test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 30 | 31 | # check if the WSO2 product home exists 32 | test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 33 | 34 | # shared artifact directories 35 | directories=("executionplans" "synapse-configs") 36 | # if the original directory locations of artifacts to be synced between nodes are empty, 37 | # copy the preserved, default content of these folders to these original locations 38 | for shared_directory in ${directories[@]}; do 39 | if test -d ${original_deployment_artifacts}/${shared_directory}; 40 | then 41 | if [[ -z "$(ls -A ${deployment_volume}/${shared_directory})" ]]; then 42 | if ! cp -R ${original_deployment_artifacts}/${shared_directory}/* ${deployment_volume}/${shared_directory}; 43 | then 44 | echo "Failed to copy the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 45 | exit 1 46 | fi 47 | echo "Successfully copied the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 48 | fi 49 | fi 50 | done 51 | 52 | # copy any configuration changes mounted to config_volume 53 | test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ 54 | # copy any artifact changes mounted to artifact_volume 55 | test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ 56 | 57 | # start WSO2 Carbon server 58 | echo "Start WSO2 Carbon server" >&2 59 | sh ${WSO2_SERVER_HOME}/bin/gateway.sh "$@" 60 | -------------------------------------------------------------------------------- /dockerfiles/ubuntu/apim-universal-gw/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # ------------------------------------------------------------------------ 17 | 18 | set -e 19 | 20 | # volume mounts 21 | config_volume=${WORKING_DIRECTORY}/wso2-config-volume 22 | artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume 23 | # home of the directories to be artifact synced within the WSO2 product home 24 | deployment_volume=${WSO2_SERVER_HOME}/repository/deployment/server 25 | # home of the directories with preserved, default deployment artifacts 26 | original_deployment_artifacts=${WORKING_DIRECTORY}/wso2-tmp 27 | 28 | # check if the WSO2 non-root user home exists 29 | test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 30 | 31 | # check if the WSO2 product home exists 32 | test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 33 | 34 | # shared artifact directories 35 | directories=("executionplans" "synapse-configs") 36 | # if the original directory locations of artifacts to be synced between nodes are empty, 37 | # copy the preserved, default content of these folders to these original locations 38 | for shared_directory in ${directories[@]}; do 39 | if test -d ${original_deployment_artifacts}/${shared_directory}; 40 | then 41 | if [[ -z "$(ls -A ${deployment_volume}/${shared_directory})" ]]; then 42 | if ! cp -R ${original_deployment_artifacts}/${shared_directory}/* ${deployment_volume}/${shared_directory}; 43 | then 44 | echo "Failed to copy the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 45 | exit 1 46 | fi 47 | echo "Successfully copied the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 48 | fi 49 | fi 50 | done 51 | 52 | # copy any configuration changes mounted to config_volume 53 | test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ 54 | # copy any artifact changes mounted to artifact_volume 55 | test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ 56 | 57 | # start WSO2 Carbon server 58 | echo "Start WSO2 Carbon server" >&2 59 | sh ${WSO2_SERVER_HOME}/bin/gateway.sh "$@" 60 | -------------------------------------------------------------------------------- /docker-compose/apim-with-mi/README.md: -------------------------------------------------------------------------------- 1 | # WSO2 API Manager with Micro Integrator 2 | 3 | ## Prerequisites 4 | 5 | * Install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git), [Docker](https://www.docker.com/get-docker) and [Docker Compose](https://docs.docker.com/compose/install/#install-compose) 6 | in order to run the steps provided in following Quick start guide.

7 | * In order to use Docker images with WSO2 updates, you need an active WSO2 subscription. 8 | If you don't have a valid WSO2 Subscription, you need to build Docker images by source. Build Docker images using Docker resources available in [here](../../dockerfiles/) and replace the `docker.wso2.com/` prefix from the `image` name in the `docker-compose.yml`.

9 | * If you are trying this out on Apple Silicon (with M1), build images that supports arm64 architecture according to the instructions in [README](../../dockerfiles/ubuntu/apim/README.md).

10 | 11 | ## Quick Start Guide 12 | 13 | 1. Login to WSO2's Private Docker Registry via Docker client. When prompted, enter the username and password of your WSO2 Subscription. 14 | 15 | ``` 16 | docker login docker.wso2.com 17 | ``` 18 | 19 | 2. Clone WSO2 API Management Docker and Docker Compose resource Git repository. 20 | 21 | ``` 22 | git clone https://github.com/wso2/docker-apim 23 | ``` 24 | 25 | > If you are to try out an already released zip of this repo, please ignore this 2nd step. 26 | 27 | 3. Switch to `docker-compose/apim-with-mi` folder. 28 | 29 | ``` 30 | cd docker-apim/docker-compose/apim-with-mi 31 | ``` 32 | > If you intend to try out an already released zip of this repository, extract the zip file and directly browse to 33 | `docker-apim-/docker-compose/apim-with-mi` folder. 34 | 35 | > If you intend to try out an already released tag, after executing 2nd step, checkout the relevant tag, 36 | i.e. for example: `git checkout tags/v4.6.0.1`, switch to `docker-compose/apim-with-mi` folder and continue with below steps. 37 | 38 | 4. Add deployable `CAR` files 39 | 40 | You may add the relevant CAR files of your integration services to `docker-compose/apim-with-mi/dockerfiles/mi/capps/`. 41 | 42 | Those will be added to the Service Catalog in APIM through Micro Integrator. For more information, refer the [documentation](https://mi.docs.wso2.com/en/4.5.0/learn/integration-tutorials/service-catalog-tutorial/#exposing-an-integration-service-as-a-managed-api). 43 | 44 | The backend service of the sample `CAR` provided can be found [here](https://github.com/wso2-docs/WSO2_EI/blob/master/Back-End-Service/Hospital-Service-JDK11-2.0.0.jar). 45 | 46 | 5. Execute following Docker Compose command to start the deployment. 47 | 48 | ``` 49 | docker-compose up --build 50 | ``` 51 | 52 | 6. Access the WSO2 API Manager web UIs using the below URLs via a web browser. 53 | 54 | ``` 55 | https://localhost:9443/publisher 56 | https://localhost:9443/devportal 57 | https://localhost:9443/admin 58 | https://localhost:9443/carbon 59 | ``` 60 | Login to the web UIs using following credentials. 61 | 62 | Please note that API Gateway will be available on following ports. 63 | ``` 64 | https://localhost:8243 65 | https://localhost:8280 66 | ``` 67 | -------------------------------------------------------------------------------- /dockerfiles/jdk17/alpine/apim/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # Copyright 2018 WSO2, Inc. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # ------------------------------------------------------------------------ 17 | 18 | set -e 19 | 20 | # volume mounts 21 | config_volume=${WORKING_DIRECTORY}/wso2-config-volume 22 | artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume 23 | # home of the directories to be artifact synced within the WSO2 product home 24 | deployment_volume=${WSO2_SERVER_HOME}/repository/deployment/server 25 | # home of the directories with preserved, default deployment artifacts 26 | original_deployment_artifacts=${WORKING_DIRECTORY}/wso2-tmp 27 | 28 | # check if the WSO2 non-root user home exists 29 | test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 30 | 31 | # check if the WSO2 product home exists 32 | test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 33 | 34 | # shared artifact directories 35 | directories=("executionplans" "synapse-configs") 36 | # if the original directory locations of artifacts to be synced between nodes are empty, 37 | # copy the preserved, default content of these folders to these original locations 38 | for shared_directory in ${directories[@]}; do 39 | if test -d ${original_deployment_artifacts}/${shared_directory}; 40 | then 41 | if [[ -z "$(ls -A ${deployment_volume}/${shared_directory})" ]]; then 42 | if ! cp -R ${original_deployment_artifacts}/${shared_directory}/* ${deployment_volume}/${shared_directory}; 43 | then 44 | echo "Failed to copy the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 45 | exit 1 46 | fi 47 | echo "Successfully copied the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 48 | fi 49 | fi 50 | done 51 | 52 | # optimize WSO2 Carbon Server, if the profile name is defined as an environment variable 53 | if [[ ! -z "${PROFILE_NAME}" ]] 54 | then 55 | echo "Optimizing WSO2 Carbon Server" >&2 56 | sh ${WSO2_SERVER_HOME}/bin/profileSetup.sh -Dprofile=${PROFILE_NAME} 57 | fi 58 | 59 | # copy any configuration changes mounted to config_volume 60 | test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ 61 | # copy any artifact changes mounted to artifact_volume 62 | test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ 63 | 64 | # start WSO2 Carbon server 65 | echo "Start WSO2 Carbon server" >&2 66 | if [[ -z "${PROFILE_NAME}" ]] 67 | then 68 | # start the server with the provided startup arguments 69 | sh ${WSO2_SERVER_HOME}/bin/api-manager.sh "$@" 70 | else 71 | # start the server with the specified profile and provided startup arguments 72 | sh ${WSO2_SERVER_HOME}/bin/api-manager.sh -Dprofile=${PROFILE_NAME} "$@" 73 | fi 74 | -------------------------------------------------------------------------------- /dockerfiles/rocky/apim-acp/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # ------------------------------------------------------------------------ 17 | 18 | set -e 19 | 20 | # volume mounts 21 | config_volume=${WORKING_DIRECTORY}/wso2-config-volume 22 | artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume 23 | # home of the directories to be artifact synced within the WSO2 product home 24 | deployment_volume=${WSO2_SERVER_HOME}/repository/deployment/server 25 | # home of the directories with preserved, default deployment artifacts 26 | original_deployment_artifacts=${WORKING_DIRECTORY}/wso2-tmp 27 | 28 | # check if the WSO2 non-root user home exists 29 | test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 30 | 31 | # check if the WSO2 product home exists 32 | test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 33 | 34 | # shared artifact directories 35 | directories=("executionplans" "synapse-configs") 36 | # if the original directory locations of artifacts to be synced between nodes are empty, 37 | # copy the preserved, default content of these folders to these original locations 38 | for shared_directory in ${directories[@]}; do 39 | if test -d ${original_deployment_artifacts}/${shared_directory}; 40 | then 41 | if [[ -z "$(ls -A ${deployment_volume}/${shared_directory})" ]]; then 42 | if ! cp -R ${original_deployment_artifacts}/${shared_directory}/* ${deployment_volume}/${shared_directory}; 43 | then 44 | echo "Failed to copy the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 45 | exit 1 46 | fi 47 | echo "Successfully copied the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 48 | fi 49 | fi 50 | done 51 | 52 | # optimize WSO2 Carbon Server, if the profile name is defined as an environment variable 53 | if [[ "${PROFILE_NAME}" == "key-manager" ]] 54 | then 55 | echo "Optimizing WSO2 Carbon Server" >&2 56 | sh ${WSO2_SERVER_HOME}/bin/profileSetup.sh -Dprofile=${PROFILE_NAME} 57 | fi 58 | 59 | # copy any configuration changes mounted to config_volume 60 | test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ 61 | # copy any artifact changes mounted to artifact_volume 62 | test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ 63 | 64 | # start WSO2 Carbon server 65 | echo "Start WSO2 Carbon server" >&2 66 | if [[ "${PROFILE_NAME}" == "key-manager" ]] 67 | then 68 | # start the server with the key-manager profile and provided startup arguments 69 | sh ${WSO2_SERVER_HOME}/bin/key-manager.sh "$@" 70 | else 71 | # start the server with the control-plane and provided startup arguments 72 | sh ${WSO2_SERVER_HOME}/bin/api-cp.sh "$@" 73 | fi 74 | -------------------------------------------------------------------------------- /dockerfiles/alpine/apim-acp/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # ------------------------------------------------------------------------ 17 | 18 | set -e 19 | 20 | # volume mounts 21 | config_volume=${WORKING_DIRECTORY}/wso2-config-volume 22 | artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume 23 | # home of the directories to be artifact synced within the WSO2 product home 24 | deployment_volume=${WSO2_SERVER_HOME}/repository/deployment/server 25 | # home of the directories with preserved, default deployment artifacts 26 | original_deployment_artifacts=${WORKING_DIRECTORY}/wso2-tmp 27 | 28 | # check if the WSO2 non-root user home exists 29 | test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 30 | 31 | # check if the WSO2 product home exists 32 | test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 33 | 34 | # shared artifact directories 35 | directories=("executionplans" "synapse-configs") 36 | # if the original directory locations of artifacts to be synced between nodes are empty, 37 | # copy the preserved, default content of these folders to these original locations 38 | for shared_directory in ${directories[@]}; do 39 | if test -d ${original_deployment_artifacts}/${shared_directory}; 40 | then 41 | if [[ -z "$(ls -A ${deployment_volume}/${shared_directory})" ]]; then 42 | if ! cp -R ${original_deployment_artifacts}/${shared_directory}/* ${deployment_volume}/${shared_directory}; 43 | then 44 | echo "Failed to copy the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 45 | exit 1 46 | fi 47 | echo "Successfully copied the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 48 | fi 49 | fi 50 | done 51 | 52 | # optimize WSO2 Carbon Server, if the profile name is defined as an environment variable 53 | if [[ "${PROFILE_NAME}" == "key-manager" ]] 54 | then 55 | echo "Optimizing WSO2 Carbon Server" >&2 56 | sh ${WSO2_SERVER_HOME}/bin/profileSetup.sh -Dprofile=${PROFILE_NAME} 57 | fi 58 | 59 | # copy any configuration changes mounted to config_volume 60 | test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ 61 | # copy any artifact changes mounted to artifact_volume 62 | test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ 63 | 64 | # start WSO2 Carbon server 65 | echo "Start WSO2 Carbon server" >&2 66 | if [[ "${PROFILE_NAME}" == "key-manager" ]] 67 | then 68 | # start the server with the key-manager profile and provided startup arguments 69 | sh ${WSO2_SERVER_HOME}/bin/key-manager.sh "$@" 70 | else 71 | # start the server with the control-plane and provided startup arguments 72 | sh ${WSO2_SERVER_HOME}/bin/api-cp.sh "$@" 73 | fi 74 | -------------------------------------------------------------------------------- /dockerfiles/ubuntu/apim-acp/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # ------------------------------------------------------------------------ 17 | 18 | set -e 19 | 20 | # volume mounts 21 | config_volume=${WORKING_DIRECTORY}/wso2-config-volume 22 | artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume 23 | # home of the directories to be artifact synced within the WSO2 product home 24 | deployment_volume=${WSO2_SERVER_HOME}/repository/deployment/server 25 | # home of the directories with preserved, default deployment artifacts 26 | original_deployment_artifacts=${WORKING_DIRECTORY}/wso2-tmp 27 | 28 | # check if the WSO2 non-root user home exists 29 | test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 30 | 31 | # check if the WSO2 product home exists 32 | test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 33 | 34 | # shared artifact directories 35 | directories=("executionplans" "synapse-configs") 36 | # if the original directory locations of artifacts to be synced between nodes are empty, 37 | # copy the preserved, default content of these folders to these original locations 38 | for shared_directory in ${directories[@]}; do 39 | if test -d ${original_deployment_artifacts}/${shared_directory}; 40 | then 41 | if [[ -z "$(ls -A ${deployment_volume}/${shared_directory})" ]]; then 42 | if ! cp -R ${original_deployment_artifacts}/${shared_directory}/* ${deployment_volume}/${shared_directory}; 43 | then 44 | echo "Failed to copy the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 45 | exit 1 46 | fi 47 | echo "Successfully copied the preserved, default artifacts to original location (${deployment_volume}/${shared_directory})" 48 | fi 49 | fi 50 | done 51 | 52 | # optimize WSO2 Carbon Server, if the profile name is defined as an environment variable 53 | if [[ "${PROFILE_NAME}" == "key-manager" ]] 54 | then 55 | echo "Optimizing WSO2 Carbon Server" >&2 56 | sh ${WSO2_SERVER_HOME}/bin/profileSetup.sh -Dprofile=${PROFILE_NAME} 57 | fi 58 | 59 | # copy any configuration changes mounted to config_volume 60 | test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ 61 | # copy any artifact changes mounted to artifact_volume 62 | test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ 63 | 64 | # start WSO2 Carbon server 65 | echo "Start WSO2 Carbon server" >&2 66 | if [[ "${PROFILE_NAME}" == "key-manager" ]] 67 | then 68 | # start the server with the key-manager profile and provided startup arguments 69 | sh ${WSO2_SERVER_HOME}/bin/key-manager.sh "$@" 70 | else 71 | # start the server with the control-plane and provided startup arguments 72 | sh ${WSO2_SERVER_HOME}/bin/api-cp.sh "$@" 73 | fi 74 | -------------------------------------------------------------------------------- /docker-compose/apim-with-analytics/README.md: -------------------------------------------------------------------------------- 1 | # WSO2 API Manager deployment with API Manager Analytics 2 | 3 | ## Prerequisites 4 | 5 | * Install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git), [Docker](https://www.docker.com/get-docker) and [Docker Compose](https://docs.docker.com/compose/install/#install-compose) 6 | in order to run the steps provided in following Quick start guide.

7 | * In order to use Docker images with WSO2 updates, you need an active WSO2 subscription. 8 | If you don't have a valid WSO2 Subscription, you need to build Docker images by source. Build Docker images using Docker resources available in [here](../../dockerfiles/) and replace the `docker.wso2.com/` prefix from the `image` name in the `docker-compose.yml`.

9 | * If you are trying this out on Apple Silicon (with M1), build images that supports arm64 architecture according to the instructions in [README](../../dockerfiles/ubuntu/apim/README.md).

10 | 11 | ## Quick Start Guide 12 | 13 | 1. Login to WSO2's Private Docker Registry via Docker client. When prompted, enter the username and password of your WSO2 Subscription. 14 | 15 | ``` 16 | docker login docker.wso2.com 17 | ``` 18 | 19 | 2. Clone WSO2 API Management Docker and Docker Compose resource Git repository. 20 | 21 | ``` 22 | git clone https://github.com/wso2/docker-apim 23 | ``` 24 | 25 | > If you are to try out an already released zip of this repo, please ignore this 2nd step. 26 | 27 | 3. Switch to `docker-compose/apim-with-analytics` folder. 28 | 29 | ``` 30 | cd docker-apim/docker-compose/apim-with-analytics 31 | ``` 32 | > If you intend to try out an already released zip of this repository, extract the zip file and directly browse to 33 | `docker-apim-/docker-compose/apim-with-analytics` folder. 34 | 35 | > If you intend to try out an already released tag, after executing 2nd step, checkout the relevant tag, 36 | i.e. for example: `git checkout tags/v4.6.0.1`, switch to `docker-compose/apim-with-analytics` folder and continue with below steps. 37 | 38 | 4. Moesif-powered WSO2 Analytics replaces Choreo Analytics for enhanced insights and observability. Go to [Moesif's official website for WSO2 API Manager](https://www.moesif.com/wrap/basic?onboard=true), sign up for a new account and obtain an `Moesif API Key` by following the steps in the [documentation](https://apim.docs.wso2.com/en/latest/monitoring/api-analytics/moesif-analytics/moesif-integration-guide/). 39 | 40 | 5. Update the analytics configurations in [deployment.toml](./conf/apim/repository/conf/deployment.toml) with the `Moesif API Key` obtained. 41 | 42 | ```toml 43 | [apim.analytics] 44 | enable = true 45 | type = "moesif" 46 | 47 | [apim.analytics.properties] 48 | moesifKey = "YOUR_MOESIF_API_KEY_HERE" 49 | moesif_base_url = "https://api.moesif.net" 50 | send_headers = false 51 | ``` 52 | 53 | 6. Execute following Docker Compose command to start the deployment. 54 | 55 | ``` 56 | docker-compose up --build 57 | ``` 58 | 59 | 7. Access the WSO2 API Manager web UIs using the below URLs via a web browser. 60 | 61 | ``` 62 | https://localhost:9443/publisher 63 | https://localhost:9443/devportal 64 | https://localhost:9443/admin 65 | https://localhost:9443/carbon 66 | ``` 67 | Login to the web UIs using following credentials. 68 | 69 | * Username: admin
70 | * Password: admin 71 | 72 | Please note that API Gateway will be available on following ports. 73 | ``` 74 | https://localhost:8243 75 | https://localhost:8280 76 | ``` 77 | -------------------------------------------------------------------------------- /docker-compose/apim-with-mi/conf/mi/conf/deployment.toml: -------------------------------------------------------------------------------- 1 | [server] 2 | hostname = "localhost" 3 | # offset = 10 4 | 5 | [user_store] 6 | type = "read_only_ldap" 7 | 8 | [keystore.primary] 9 | file_name = "repository/resources/security/wso2carbon.jks" 10 | password = "wso2carbon" 11 | alias = "wso2carbon" 12 | key_password = "wso2carbon" 13 | 14 | [truststore] 15 | file_name = "repository/resources/security/client-truststore.jks" 16 | password = "wso2carbon" 17 | alias = "symmetric.key.value" 18 | algorithm = "AES" 19 | 20 | ## Following are set of example configs. Please refer docs for complete set of configurations. 21 | 22 | # [transport.http] 23 | # socket_timeout = 180000 # timeout in milliseconds 24 | # disable_connection_keepalive = false 25 | # connection_timeout = 90000 # in milliseconds 26 | 27 | # [transport.jms] 28 | # sender_enable = true 29 | # listener_enable = true 30 | 31 | # [[transport.jms.sender]] 32 | # name = "myQueueSender" 33 | # parameter.initial_naming_factory = "org.apache.activemq.jndi.ActiveMQInitialContextFactory" 34 | # parameter.provider_url = "tcp://localhost:61616" 35 | # parameter.connection_factory_name = "QueueConnectionFactory" 36 | # parameter.connection_factory_type = "queue" 37 | # parameter.cache_level = "producer" 38 | 39 | 40 | #[[transport.jms.listener]] 41 | # name = "myQueueConnectionFactory" 42 | # parameter.initial_naming_factory = "org.apache.activemq.jndi.ActiveMQInitialContextFactory" 43 | # parameter.provider_url = "tcp://localhost:61616" 44 | # parameter.connection_factory_name = "QueueConnectionFactory" 45 | # parameter.connection_factory_type = "queue" 46 | 47 | # [transport.jndi.connection_factories] 48 | # 'connectionfactory.QueueConnectionFactory' = "amqp://admin:admin@clientID/carbon?brokerlist='tcp://localhost:5675'" 49 | # 'connectionfactory.TopicConnectionFactory' = "amqp://admin:admin@clientID/carbon?brokerlist='tcp://localhost:5675'" 50 | 51 | # [transport.jndi.queue] 52 | # jndiNameOfQueue = "physicalNameOfQueue" 53 | 54 | # [transport.jndi.topic] 55 | # jndiNameOfTopic = "physicalNameOfTopic" 56 | 57 | # [transport.rabbitmq] 58 | # sender_enable = true 59 | # listener_enable = true 60 | 61 | # [[transport.rabbitmq.sender]] 62 | # name = "AMQPConnectionFactory" 63 | # parameter.hostname = "localhost" 64 | # parameter.port = 5672 65 | # parameter.username = "guest" 66 | # parameter.password = "guest" 67 | 68 | # [[transport.rabbitmq.listener]] 69 | # name = "AMQPConnectionFactory" 70 | # parameter.hostname = "localhost" 71 | # parameter.port = 5672 72 | # parameter.username = "guest" 73 | # parameter.password = "guest" 74 | 75 | # [[transport.phase_order]] 76 | # Entire phase_order list can be found under 'Axis2 Phases' in /repository/resources/conf/deployment-full.toml. 77 | # If an Axis2 phase needs to added/removed, include all of the 78 | # Inflow, OutFlow & OutFaultFlow phases found in the deployment-full.toml and change them as needed. 79 | 80 | # [system.parameter] 81 | # 'key' = "value" 82 | 83 | # [[datasource]] 84 | # id = "WSO2CarbonDB" # "WSO2_COORDINATION_DB" 85 | # url = "jdbc:mysql://localhost:3306/integratordb" 86 | # username = "root" 87 | # password = "root" 88 | # driver = "com.mysql.jdbc.Driver" 89 | 90 | # [management_api] 91 | # protocols = "http" 92 | 93 | # [[internal_apis.users]] 94 | # user.name = "user-1" 95 | # user.password = "pwd-1" 96 | 97 | # [transaction_counter] 98 | # enable = true 99 | # data_source = "WSO2CarbonDB" 100 | # update_interval = 2 101 | 102 | # [mediation] 103 | # synapse.global_timeout_interval = "120000" # interval in milliseconds 104 | 105 | # [secrets] 106 | # secret_key = "[secret value]" 107 | 108 | [[service_catalog]] 109 | apim_host = "https://api-manager:9443" 110 | enable = true 111 | username = "admin" 112 | password = "admin" 113 | 114 | # [dashboard_config] 115 | # dashboard_url = "https://localhost:9743/dashboard/api/" 116 | -------------------------------------------------------------------------------- /dockerfiles/alpine/apim/README.md: -------------------------------------------------------------------------------- 1 | # Dockerfile for WSO2 API Manager # 2 | 3 | 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.6.0. 4 | 5 | ## Prerequisites 6 | 7 | * [Docker](https://www.docker.com/get-docker) v20.10.x or above 8 | * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client 9 | 10 | ## How to build an image and run 11 | 12 | #### 1. Checkout this repository into your local machine using the following Git client command. 13 | 14 | ``` 15 | git clone https://github.com/wso2/docker-apim.git 16 | ``` 17 | 18 | > The local copy of the `dockerfiles/alpine/apim` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. 19 | 20 | #### 2. Build the Docker image. 21 | 22 | - Download wso2am-4.6.0.zip from [here](https://wso2.com/api-management/install/) 23 | - Host the product pack using a webserver. 24 | - Navigate to `` directory.
25 | - Execute `docker build` command as shown below. 26 | 27 | ``` 28 | docker build -t wso2am:4.6.0-alpine . 29 | ``` 30 | 31 | > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. 32 | 33 | > Note:- wso2am:4.6.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. 34 | 35 | ``` 36 | docker buildx build --platform linux/amd64 -t wso2am:4.6.0-alpine . 37 | ``` 38 | 39 | #### 3. Running the Docker image. 40 | 41 | ``` 42 | docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.6.0-alpine 43 | ``` 44 | 45 | > Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. 46 | You may map other container service ports, which have been exposed to Docker host ports, as desired. 47 | 48 | #### 4. Accessing management console. 49 | 50 | - To access the management console, use the docker host IP and port 9443. 51 | + `https://:9443/carbon` 52 | 53 | > In here, refers to hostname or IP of the host machine on top of which containers are spawned. 54 | 55 | ## How to update configurations 56 | 57 | Configurations would lie on the Docker host machine and they can be volume mounted to the container.
58 | As an example, steps required to change the port offset using `deployment.toml` is as follows: 59 | 60 | #### 1. Stop the API Manager container if it's already running. 61 | 62 | In WSO2 API Manager version 4.6.0 product distribution, `deployment.toml` configuration file
63 | can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
64 | referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. 65 | 66 | #### 2. Grant read permission to `other` users for `/deployment.toml`. 67 | 68 | ``` 69 | chmod o+r /deployment.toml 70 | ``` 71 | 72 | #### 3. Run the image by mounting the file to container as follows: 73 | 74 | ``` 75 | docker run -it \ 76 | -p 9444:9444 \ 77 | -p 8244:8244 \ 78 | --volume /deployment.toml:/deployment.toml \ 79 | wso2am:4.6.0-alpine 80 | ``` 81 | 82 | > In here, refers to /home/wso2carbon/wso2am-4.6.0/repository/conf folder of the container. 83 | 84 | ## WSO2 Private Docker images 85 | 86 | If you have a valid WSO2 subscription you can have access to WSO2 private Docker images. These images will get updated frequently with bug fixes, security fixes and new improvements. To view available images visit [WSO2 Docker Repositories](https://docker.wso2.com/) 87 | 88 | ## Docker command usage references 89 | 90 | * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) 91 | * [Docker run command reference](https://docs.docker.com/engine/reference/run/) 92 | * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) 93 | * [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) 94 | -------------------------------------------------------------------------------- /dockerfiles/alpine/apim-acp/README.md: -------------------------------------------------------------------------------- 1 | # Dockerfile for WSO2 API Manager - API Control Plane # 2 | 3 | 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 API Control Plane 4.6.0. 4 | 5 | ## Prerequisites 6 | 7 | * [Docker](https://www.docker.com/get-docker) v20.10.x or above 8 | * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client 9 | 10 | ## How to build an image and run 11 | 12 | #### 1. Checkout this repository into your local machine using the following Git client command. 13 | 14 | ``` 15 | git clone https://github.com/wso2/docker-apim.git 16 | ``` 17 | 18 | > The local copy of the `dockerfiles/alpine/apim-acp` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. 19 | 20 | #### 2. Build the Docker image. 21 | 22 | - Download wso2am-acp-4.6.0.zip from [here](https://wso2.com/api-management/install/) 23 | - Host the product pack using a webserver. 24 | - Navigate to `` directory.
25 | - Execute `docker build` command as shown below. 26 | 27 | ``` 28 | docker build -t wso2am-acp:4.6.0-alpine . 29 | ``` 30 | 31 | > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. 32 | 33 | > Note:- wso2am-acp:4.6.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. 34 | 35 | ``` 36 | docker buildx build --platform linux/amd64 -t wso2am-acp:4.6.0-alpine . 37 | ``` 38 | 39 | #### 3. Running the Docker image. 40 | 41 | ``` 42 | docker run -it -p 9443:9443 -p 9611:9611 -p 9711:9711 -p 5672:5672 wso2am-acp:4.6.0-alpine 43 | ``` 44 | 45 | > Here, only port 9443 (HTTPS servlet transport) and ports 9611, 9711, 5672 have been mapped to Docker host ports. 46 | You may map other container service ports, which have been exposed to Docker host ports, as desired. 47 | 48 | #### 4. Accessing management console. 49 | 50 | - To access the management console, use the docker host IP and port 9443. 51 | + `https://:9443/carbon` 52 | 53 | > In here, refers to hostname or IP of the host machine on top of which containers are spawned. 54 | 55 | ## How to update configurations 56 | 57 | Configurations would lie on the Docker host machine and they can be volume mounted to the container.
58 | As an example, steps required to change the port offset using `deployment.toml` is as follows: 59 | 60 | #### 1. Stop the API Manager container if it's already running. 61 | 62 | In WSO2 API Manager version 4.6.0 product distribution, `deployment.toml` configuration file
63 | can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
64 | referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. 65 | 66 | #### 2. Grant read permission to `other` users for `/deployment.toml`. 67 | 68 | ``` 69 | chmod o+r /deployment.toml 70 | ``` 71 | 72 | #### 3. Run the image by mounting the file to container as follows: 73 | 74 | ``` 75 | docker run -it \ 76 | -p 9444:9444 \ 77 | --volume /deployment.toml:/deployment.toml \ 78 | wso2am-acp:4.6.0-alpine 79 | ``` 80 | 81 | > In here, refers to /home/wso2carbon/wso2am-acp-4.6.0/repository/conf folder of the container. 82 | 83 | ## WSO2 Private Docker images 84 | 85 | If you have a valid WSO2 subscription you can have access to WSO2 private Docker images. These images will get updated frequently with bug fixes, security fixes and new improvements. To view available images visit [WSO2 Docker Repositories](https://docker.wso2.com/) 86 | 87 | ## Docker command usage references 88 | 89 | * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) 90 | * [Docker run command reference](https://docs.docker.com/engine/reference/run/) 91 | * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) 92 | * [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) 93 | -------------------------------------------------------------------------------- /dockerfiles/alpine/apim-tm/README.md: -------------------------------------------------------------------------------- 1 | # Dockerfile for WSO2 API Manager - Traffice Manager # 2 | 3 | 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 - Traffic Manager 4.6.0. 4 | 5 | ## Prerequisites 6 | 7 | * [Docker](https://www.docker.com/get-docker) v20.10.x or above 8 | * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client 9 | 10 | ## How to build an image and run 11 | 12 | #### 1. Checkout this repository into your local machine using the following Git client command. 13 | 14 | ``` 15 | git clone https://github.com/wso2/docker-apim.git 16 | ``` 17 | 18 | > The local copy of the `dockerfiles/alpine/apim-tm` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. 19 | 20 | #### 2. Build the Docker image. 21 | 22 | - Download wso2am-tm-4.6.0.zip from [here](https://wso2.com/api-management/install/) 23 | - Host the product pack using a webserver. 24 | - Navigate to `` directory.
25 | - Execute `docker build` command as shown below. 26 | 27 | ``` 28 | docker build -t wso2am-tm:4.6.0-alpine . 29 | ``` 30 | 31 | > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. 32 | 33 | > Note:- wso2am-tm:4.6.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. 34 | 35 | ``` 36 | docker buildx build --platform linux/amd64 -t wso2am-tm:4.6.0-alpine . 37 | ``` 38 | 39 | #### 3. Running the Docker image. 40 | 41 | ``` 42 | docker run -it -p 9443:9443 -p 9611:9611 -p 5672:5672 -p 9711:9711 wso2am-tm:4.6.0-alpine 43 | ``` 44 | 45 | > Here, only port 9443 (HTTPS servlet transport) and ports 9611, 5672, 9711 have been mapped to Docker host ports. 46 | You may map other container service ports, which have been exposed to Docker host ports, as desired. 47 | 48 | #### 4. Accessing management console. 49 | 50 | - To access the management console, use the docker host IP and port 9443. 51 | + `https://:9443/carbon` 52 | 53 | > In here, refers to hostname or IP of the host machine on top of which containers are spawned. 54 | 55 | ## How to update configurations 56 | 57 | Configurations would lie on the Docker host machine and they can be volume mounted to the container.
58 | As an example, steps required to change the port offset using `deployment.toml` is as follows: 59 | 60 | #### 1. Stop the API Manager container if it's already running. 61 | 62 | In WSO2 API Manager version 4.6.0 product distribution, `deployment.toml` configuration file
63 | can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
64 | referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. 65 | 66 | #### 2. Grant read permission to `other` users for `/deployment.toml`. 67 | 68 | ``` 69 | chmod o+r /deployment.toml 70 | ``` 71 | 72 | #### 3. Run the image by mounting the file to container as follows: 73 | 74 | ``` 75 | docker run -it \ 76 | -p 9444:9444 \ 77 | -p 8244:8244 \ 78 | --volume /deployment.toml:/deployment.toml \ 79 | wso2am-tm:4.6.0-alpine 80 | ``` 81 | 82 | > In here, refers to /home/wso2carbon/wso2am-tm-4.6.0/repository/conf folder of the container. 83 | 84 | ## WSO2 Private Docker images 85 | 86 | If you have a valid WSO2 subscription you can have access to WSO2 private Docker images. These images will get updated frequently with bug fixes, security fixes and new improvements. To view available images visit [WSO2 Docker Repositories](https://docker.wso2.com/) 87 | 88 | ## Docker command usage references 89 | 90 | * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) 91 | * [Docker run command reference](https://docs.docker.com/engine/reference/run/) 92 | * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) 93 | * [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) 94 | -------------------------------------------------------------------------------- /dockerfiles/alpine/apim-universal-gw/README.md: -------------------------------------------------------------------------------- 1 | # Dockerfile for WSO2 API Manager - Gateway # 2 | 3 | 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 Gateway 4.6.0. 4 | 5 | ## Prerequisites 6 | 7 | * [Docker](https://www.docker.com/get-docker) v20.10.x or above 8 | * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client 9 | 10 | ## How to build an image and run 11 | 12 | #### 1. Checkout this repository into your local machine using the following Git client command. 13 | 14 | ``` 15 | git clone https://github.com/wso2/docker-apim.git 16 | ``` 17 | 18 | > The local copy of the `dockerfiles/alpine/apim-gw` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. 19 | 20 | #### 2. Build the Docker image. 21 | 22 | - Download wso2am-universal-gw-4.6.0.zip from [here](https://wso2.com/api-management/install/) 23 | - Host the product pack using a webserver. 24 | - Navigate to `` directory.
25 | - Execute `docker build` command as shown below. 26 | 27 | ``` 28 | docker build -t wso2am-universal-gw:4.6.0-alpine . 29 | ``` 30 | 31 | > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. 32 | 33 | > Note:- wso2am-universal-gw:4.6.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. 34 | 35 | ``` 36 | docker buildx build --platform linux/amd64 -t wso2am-universal-gw:4.6.0-alpine . 37 | ``` 38 | 39 | #### 3. Running the Docker image. 40 | 41 | ``` 42 | docker run -it -p 8243:8243 wso2am-universal-gw:4.6.0-alpine 43 | ``` 44 | 45 | > Here, port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. 46 | You may map other container service ports, which have been exposed to Docker host ports, as desired. 47 | 48 | #### 4. Accessing management console. 49 | 50 | - To access the management console, use the docker host IP and port 9443. 51 | + `https://:9443/carbon` 52 | 53 | > In here, refers to hostname or IP of the host machine on top of which containers are spawned. 54 | 55 | ## How to update configurations 56 | 57 | Configurations would lie on the Docker host machine and they can be volume mounted to the container.
58 | As an example, steps required to change the port offset using `deployment.toml` is as follows: 59 | 60 | #### 1. Stop the API Manager container if it's already running. 61 | 62 | In WSO2 API Manager version 4.6.0 product distribution, `deployment.toml` configuration file
63 | can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
64 | referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. 65 | 66 | #### 2. Grant read permission to `other` users for `/deployment.toml`. 67 | 68 | ``` 69 | chmod o+r /deployment.toml 70 | ``` 71 | 72 | #### 3. Run the image by mounting the file to container as follows: 73 | 74 | ``` 75 | docker run -it \ 76 | -p 9444:9444 \ 77 | -p 8244:8244 \ 78 | --volume /deployment.toml:/deployment.toml \ 79 | wso2am-universal-gw:4.6.0-alpine 80 | ``` 81 | 82 | > In here, refers to /home/wso2carbon/wso2am-universal-gw-4.6.0/repository/conf folder of the container. 83 | 84 | ## WSO2 Private Docker images 85 | 86 | If you have a valid WSO2 subscription you can have access to WSO2 private Docker images. These images will get updated frequently with bug fixes, security fixes and new improvements. To view available images visit [WSO2 Docker Repositories](https://docker.wso2.com/) 87 | 88 | ## Docker command usage references 89 | 90 | * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) 91 | * [Docker run command reference](https://docs.docker.com/engine/reference/run/) 92 | * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) 93 | * [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) 94 | -------------------------------------------------------------------------------- /docker-compose/apim-is-as-km-with-analytics/README.md: -------------------------------------------------------------------------------- 1 | # WSO2 API Manager with Identity Server as Key Manager and Analytics Support 2 | 3 | ## Prerequisites 4 | 5 | * Install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git), [Docker](https://www.docker.com/get-docker) and [Docker Compose](https://docs.docker.com/compose/install/#install-compose) 6 | in order to run the steps provided in following Quick start guide.

7 | * In order to use Docker images with WSO2 updates, you need an active WSO2 subscription. 8 | If you don't have a valid WSO2 Subscription, you need to build Docker images by source. Build Docker images using Docker resources available in [here](../../dockerfiles/) and replace the `docker.wso2.com/` prefix from the `image` name in the `docker-compose.yml`.

9 | * If you are trying this out on Apple Silicon (with M1), build images that supports arm64 architecture according to the instructions in [README](../../dockerfiles/ubuntu/apim/README.md).

10 | 11 | ## Quick Start Guide 12 | 13 | 1. Login to WSO2's Private Docker Registry via Docker client. When prompted, enter the username and password of your WSO2 Subscription. 14 | 15 | ``` 16 | docker login docker.wso2.com 17 | ``` 18 | 19 | 2. Clone WSO2 API Management Docker and Docker Compose resource Git repository. 20 | 21 | ``` 22 | git clone https://github.com/wso2/docker-apim 23 | ``` 24 | 25 | > If you are to try out an already released zip of this repo, please ignore this 2nd step. 26 | 27 | 3. Switch to `docker-compose/apim-is-as-km-with-analytics` folder. 28 | 29 | ``` 30 | cd docker-apim/docker-compose/apim-is-as-km-with-analytics 31 | ``` 32 | > If you intend to try out an already released zip of this repository, extract the zip file and directly browse to 33 | `docker-apim-/docker-compose/apim-is-as-km-with-analytics` folder. 34 | 35 | > If you intend to try out an already released tag, after executing 2nd step, checkout the relevant tag, 36 | i.e. for example: `git checkout tags/v4.6.0.1`, switch to `docker-compose/apim-is-as-km-with-analytics` folder and continue with below steps. 37 | 38 | 4. [Optional] Replace the existing IS extensions with the latest. 39 | 40 | For this, refer to steps `3`, `4` and `5` of the [Configure WSO2 IS section](https://apim.docs.wso2.com/en/latest/administer/key-managers/configure-wso2is-connector/#step-1-configure-wso2-is). 41 | 42 | You may replace the JARs in `docker-compose/apim-is-as-km-with-analytics/dockerfiles/is-as-km/dropins` as defined in step 4. 43 | 44 | You may replace the web app in `docker-compose/apim-is-as-km-with-analytics/dockerfiles/is-as-km/webapps` as defined in step 5. 45 | 46 | 5. Moesif-powered WSO2 Analytics replaces Choreo Analytics for enhanced insights and observability. Go to [Moesif's official website for WSO2 API Manager](https://www.moesif.com/wrap/basic?onboard=true), sign up for a new account and obtain an `Moesif API Key` by following the steps in the [documentation](https://apim.docs.wso2.com/en/latest/monitoring/api-analytics/moesif-analytics/moesif-integration-guide/). 47 | 48 | 6. Update the analytics configurations in [deployment.toml](./conf/apim/repository/conf/deployment.toml) with the `Moesif API Key` obtained. 49 | 50 | ```toml 51 | [apim.analytics] 52 | enable = true 53 | type = "moesif" 54 | 55 | [apim.analytics.properties] 56 | moesifKey = "YOUR_MOESIF_API_KEY_HERE" 57 | moesif_base_url = "https://api.moesif.net" 58 | send_headers = false 59 | ``` 60 | 61 | 7. Execute following Docker Compose command to start the deployment. 62 | 63 | ``` 64 | docker-compose up --build 65 | ``` 66 | 67 | 8. Access the WSO2 API Manager web UIs using the below URLs via a web browser. 68 | 69 | ``` 70 | https://localhost:9443/publisher 71 | https://localhost:9443/devportal 72 | https://localhost:9443/admin 73 | https://localhost:9443/carbon 74 | ``` 75 | Login to the web UIs using following credentials. 76 | 77 | * Username: admin
78 | * Password: admin 79 | 80 | Please note that API Gateway will be available on following ports. 81 | ``` 82 | https://localhost:8243 83 | https://localhost:8280 84 | ``` 85 | 86 | 9. To see analytics data, log in to [Choreo Analytics](https://analytics.choreo.dev/). 87 | 88 | Note: In order to support the renewed wso2carbon certificate in API Manager, we are mounting wso2carbon and client-truststore keystores with the renewed certificate in the Identity Server. 89 | -------------------------------------------------------------------------------- /dockerfiles/jdk17/alpine/apim/README.md: -------------------------------------------------------------------------------- 1 | # Dockerfile for WSO2 API Manager # 2 | 3 | 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.6.0. 4 | 5 | ## Prerequisites 6 | 7 | * [Docker](https://www.docker.com/get-docker) v20.10.x or above 8 | * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client 9 | 10 | ## How to build an image and run 11 | 12 | #### 1. Checkout this repository into your local machine using the following Git client command. 13 | 14 | ``` 15 | git clone https://github.com/wso2/docker-apim.git 16 | ``` 17 | 18 | > The local copy of the `dockerfiles/alpine/apim` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. 19 | 20 | #### 2. Build the Docker image. 21 | 22 | - Download wso2am-4.6.0.zip from [here](https://wso2.com/api-management/install/) 23 | - Host the product pack using a webserver. 24 | - Navigate to `` directory.
25 | - Execute `docker build` command as shown below. 26 | 27 | ``` 28 | docker build -t wso2am:4.6.0-alpine-jdk17 . 29 | ``` 30 | 31 | > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. 32 | 33 | > Note:- wso2am:4.6.0-alpine-jdk17 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. 34 | 35 | ``` 36 | docker buildx build --platform linux/amd64 -t wso2am:4.6.0-alpine-jdk17 . 37 | ``` 38 | 39 | #### 3. Running the Docker image. 40 | 41 | ``` 42 | docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.6.0-alpine-jdk17 43 | ``` 44 | 45 | > Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. 46 | You may map other container service ports, which have been exposed to Docker host ports, as desired. 47 | 48 | #### 4. Accessing management console. 49 | 50 | - To access the management console, use the docker host IP and port 9443. 51 | + `https://:9443/carbon` 52 | 53 | > In here, refers to hostname or IP of the host machine on top of which containers are spawned. 54 | 55 | ## How to update configurations 56 | 57 | Configurations would lie on the Docker host machine and they can be volume mounted to the container.
58 | As an example, steps required to change the port offset using `deployment.toml` is as follows: 59 | 60 | #### 1. Stop the API Manager container if it's already running. 61 | 62 | In WSO2 API Manager version 4.6.0 product distribution, `deployment.toml` configuration file
63 | can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
64 | referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. 65 | 66 | #### 2. Grant read permission to `other` users for `/deployment.toml`. 67 | 68 | ``` 69 | chmod o+r /deployment.toml 70 | ``` 71 | 72 | #### 3. Run the image by mounting the file to container as follows: 73 | 74 | ``` 75 | docker run \ 76 | -p 9444:9444 \ 77 | -p 8244:8244 \ 78 | --volume /deployment.toml:/deployment.toml \ 79 | wso2am:4.6.0-alpine-jdk17 80 | ``` 81 | 82 | > In here, refers to /home/wso2carbon/wso2am-4.6.0/repository/conf folder of the container. 83 | 84 | ## Running official wso2am image 85 | It is possible to use official wso2am images without building them from the scratch. 86 | 87 | - To run on amd64 88 | ``` 89 | docker run -it -p 9443:9443 -p 8243:8243 wso2/wso2am:4.6.0-alpine-jdk17 90 | ``` 91 | > This image is only supported for amd64. 92 | 93 | ## WSO2 Private Docker images 94 | 95 | If you have a valid WSO2 subscription you can have access to WSO2 private Docker images. These images will get updated frequently with bug fixes, security fixes and new improvements. To view available images visit [WSO2 Docker Repositories](https://docker.wso2.com/) 96 | 97 | ## Docker command usage references 98 | 99 | * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) 100 | * [Docker run command reference](https://docs.docker.com/engine/reference/run/) 101 | * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) 102 | * [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) 103 | -------------------------------------------------------------------------------- /docker-compose/apim-is-as-km-with-analytics/conf/is-as-km/repository/conf/deployment.toml: -------------------------------------------------------------------------------- 1 | [server] 2 | hostname = "localhost" 3 | offset = 1 4 | node_ip = "127.0.0.1" 5 | base_path = "https://$ref{server.hostname}:${carbon.management.port}" 6 | 7 | [super_admin] 8 | username = "admin" 9 | password = "admin" 10 | create_admin_account = true 11 | 12 | [user_store] 13 | type = "database_unique_id" 14 | 15 | [database.identity_db] 16 | type = "mysql" 17 | url = "jdbc:mysql://mysql:3306/WSO2AM_DB?autoReconnect=true&allowPublicKeyRetrieval=true&useSSL=false" 18 | username = "wso2carbon" 19 | password = "wso2carbon" 20 | driver = "com.mysql.cj.jdbc.Driver" 21 | 22 | [database.shared_db] 23 | type = "mysql" 24 | url = "jdbc:mysql://mysql:3306/WSO2AM_SHARED_DB?autoReconnect=true&allowPublicKeyRetrieval=true&useSSL=false" 25 | username = "wso2carbon" 26 | password = "wso2carbon" 27 | driver = "com.mysql.cj.jdbc.Driver" 28 | 29 | [keystore] 30 | userstore_password_encryption = "InternalKeyStore" 31 | 32 | [truststore] 33 | file_name="client-truststore.jks" 34 | password="wso2carbon" 35 | type="JKS" 36 | 37 | [account_recovery.endpoint.auth] 38 | hash= "66cd9688a2ae068244ea01e70f0e230f5623b7fa4cdecb65070a09ec06452262" 39 | 40 | [identity.auth_framework.endpoint] 41 | app_password= "dashboard" 42 | 43 | # The KeyStore which is used for encrypting/decrypting internal data. By default the primary keystore is used as the internal keystore. 44 | 45 | #[keystore.internal] 46 | #file_name = "$ref{keystore.primary.file_name}" 47 | #type = "$ref{keystore.primary.type}" 48 | #password = "$ref{keystore.primary.password}" 49 | #alias = "$ref{keystore.primary.alias}" 50 | #key_password = "$ref{keystore.primary.key_password}" 51 | 52 | # The KeyStore which is used for tls communication. By default the primary keystore is used as the tls keystore. 53 | 54 | #[keystore.tls] 55 | #file_name = "$ref{keystore.primary.file_name}" 56 | #type = "$ref{keystore.primary.type}" 57 | #password = "$ref{keystore.primary.password}" 58 | #alias = "$ref{keystore.primary.alias}" 59 | #key_password = "$ref{keystore.primary.key_password}" 60 | 61 | #Google reCAPTCHA settings. 62 | 63 | #[recaptcha] 64 | #enabled = true 65 | #api_url = "https://www.google.com/recaptcha/api.js" 66 | #verify_url = "https://www.google.com/recaptcha/api/siteverify" 67 | #site_key = "" 68 | #secret_key = "" 69 | 70 | # SMTP email sender settings. 71 | #[output_adapter.email] 72 | #from_address= "abcd@gmail.com" 73 | #username= "abcd" 74 | #password= "xxxx" 75 | #hostname= "smtp.gmail.com" 76 | #port= 587 77 | 78 | [[event_listener]] 79 | id = "token_revocation" 80 | type = "org.wso2.carbon.identity.core.handler.AbstractIdentityHandler" 81 | name = "org.wso2.is.notification.ApimOauthEventInterceptor" 82 | order = 1 83 | 84 | [event_listener.properties] 85 | notification_endpoint = "https://api-manager:9443/internal/data/v1/notify" 86 | username = "${admin.username}" 87 | password = "${admin.password}" 88 | 'header.X-WSO2-KEY-MANAGER' = "WSO2-IS" 89 | 90 | [[resource.access_control]] 91 | context = "(.)/keymanager-operations/user-info/claims(.)" 92 | secure = true 93 | http_method = "GET" 94 | permissions = "/permission/admin/manage/identity/usermgt/list" 95 | scopes = "internal_user_mgt_list" 96 | 97 | [[resource.access_control]] 98 | context = "(.*)/keymanager-operations/user-info/claims/generate" 99 | secure = true 100 | http_method = "POST" 101 | permissions = "/permission/admin/manage/identity/usermgt/list" 102 | scopes = "internal_user_mgt_list" 103 | 104 | [[resource.access_control]] 105 | context = "(.*)/keymanager-operations/dcr/register" 106 | secure = true 107 | http_method = "POST" 108 | permissions = "/permission/admin/manage/identity/applicationmgt/create" 109 | scopes = "internal_application_mgt_create" 110 | 111 | [[resource.access_control]] 112 | context = "(.*)/keymanager-operations/dcr/register(.*)" 113 | secure = true 114 | http_method = "GET" 115 | permissions = "/permission/admin/manage/identity/applicationmgt/view" 116 | scopes = "internal_application_mgt_view" 117 | 118 | [[resource.access_control]] 119 | context = "(.*)/keymanager-operations/dcr/register(.*)" 120 | secure = true 121 | http_method = "DELETE" 122 | permissions = "/permission/admin/manage/identity/applicationmgt/delete" 123 | scopes = "internal_application_mgt_delete" 124 | 125 | [[resource.access_control]] 126 | context = "(.*)/keymanager-operations/dcr/register(.*)" 127 | secure = true 128 | http_method = "PUT" 129 | permissions = "/permission/admin/manage/identity/applicationmgt/update" 130 | scopes = "internal_application_mgt_update" 131 | 132 | [[resource.access_control]] 133 | context = "(.*)/keymanager-operations/dcr/register(.*)" 134 | secure = true 135 | http_method = "POST" 136 | permissions = "/permission/admin/manage/identity/applicationmgt/update" 137 | scopes = "internal_application_mgt_update" 138 | 139 | [tenant_context.rewrite] 140 | custom_webapps = ["/keymanager-operations/"] 141 | 142 | [system.parameter] 143 | "org.wso2.CipherTransformation" = "RSA/ECB/OAEPwithSHA1andMGF1Padding" 144 | 145 | [encryption] 146 | internal_crypto_provider = "org.wso2.carbon.crypto.provider.KeyStoreBasedInternalCryptoProvider" 147 | 148 | [authorization_manager.properties] 149 | GroupAndRoleSeparationEnabled = false 150 | -------------------------------------------------------------------------------- /dockerfiles/jdk17/alpine/apim/Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2018 WSO2, Inc. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # 17 | # ------------------------------------------------------------------------ 18 | 19 | # set base Docker image to Alpine 20 | FROM alpine:3.19.1 21 | 22 | ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' 23 | 24 | # install dependencies 25 | RUN apk add --no-cache tzdata musl-locales musl-locales-lang bash libxml2-utils netcat-openbsd \ 26 | && rm -rf /var/cache/apk/* 27 | 28 | ENV JAVA_VERSION jdk-17.0.11+9 29 | 30 | # install Temurin OpenJDK 17 31 | RUN set -eux; \ 32 | ARCH="$(apk --print-arch)"; \ 33 | case "${ARCH}" in \ 34 | amd64|x86_64) \ 35 | ESUM='839326b5b4b3e4ac2edc3b685c8ab550f9b6d267eddf966323c801cb21e3e018'; \ 36 | BINARY_URL='https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_x64_alpine-linux_hotspot_17.0.11_9.tar.gz'; \ 37 | ;; \ 38 | *) \ 39 | echo "Unsupported arch: ${ARCH}"; \ 40 | exit 1; \ 41 | ;; \ 42 | esac; \ 43 | wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ 44 | echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ 45 | mkdir -p /opt/java/openjdk; \ 46 | tar --extract \ 47 | --file /tmp/openjdk.tar.gz \ 48 | --directory /opt/java/openjdk \ 49 | --strip-components 1 \ 50 | --no-same-owner \ 51 | ; \ 52 | rm -rf /tmp/openjdk.tar.gz; 53 | 54 | ENV JAVA_HOME=/opt/java/openjdk \ 55 | PATH="/opt/java/openjdk/bin:$PATH" 56 | 57 | LABEL maintainer="WSO2 Docker Maintainers " \ 58 | com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.6.0.1" 59 | 60 | # set Docker image build arguments 61 | # build arguments for user/group configurations 62 | ARG USER=wso2carbon 63 | ARG USER_ID=10001 64 | ARG USER_GROUP=wso2 65 | ARG USER_GROUP_ID=10001 66 | ARG USER_HOME=/home/${USER} 67 | # build arguments for WSO2 product installation 68 | ARG WSO2_SERVER_NAME=wso2am 69 | ARG WSO2_SERVER_VERSION=4.6.0 70 | ARG WSO2_SERVER_ZIP_VERSION=${WSO2_SERVER_VERSION} 71 | ARG WSO2_SERVER_REPOSITORY=product-apim 72 | ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} 73 | ARG WSO2_SERVER_ZIP=${WSO2_SERVER_NAME}-${WSO2_SERVER_ZIP_VERSION} 74 | ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} 75 | ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_ZIP_VERSION}/${WSO2_SERVER_ZIP}.zip 76 | # build argument for MOTD 77 | ARG MOTD='printf "\n\ 78 | Welcome to WSO2 Docker Resources \n\ 79 | --------------------------------- \n\ 80 | This Docker container comprises of a WSO2 product, running with its latest GA release \n\ 81 | which is under the Apache License, Version 2.0. \n\ 82 | Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n"' 83 | ENV ENV=${USER_HOME}"/.ashrc" 84 | 85 | # create the non-root user and group and set MOTD login message 86 | RUN \ 87 | addgroup -S -g ${USER_GROUP_ID} ${USER_GROUP} \ 88 | && adduser -S -u ${USER_ID} -h ${USER_HOME} -G ${USER_GROUP} ${USER} \ 89 | && echo ${MOTD} > "${ENV}" 90 | 91 | # copy init script to user home 92 | COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ 93 | 94 | # add the WSO2 product distribution to user's home directory 95 | RUN \ 96 | wget -O ${WSO2_SERVER_ZIP}.zip "${WSO2_SERVER_DIST_URL}" \ 97 | && unzip -d ${USER_HOME} ${WSO2_SERVER_ZIP}.zip \ 98 | && EXTRACTED_DIR=$(ls -1 ${USER_HOME} | grep "^${WSO2_SERVER_NAME}-" | head -1) \ 99 | && if [ "${EXTRACTED_DIR}" != "${WSO2_SERVER}" ]; then mv ${USER_HOME}/${EXTRACTED_DIR} ${USER_HOME}/${WSO2_SERVER}; fi \ 100 | && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ 101 | && mkdir ${USER_HOME}/wso2-tmp \ 102 | && bash -c 'mkdir -p ${USER_HOME}/solr/{indexed-data,database}' \ 103 | && chown wso2carbon:wso2 -R ${USER_HOME}/solr \ 104 | && cp -r ${WSO2_SERVER_HOME}/repository/deployment/server/synapse-configs ${USER_HOME}/wso2-tmp \ 105 | && cp -r ${WSO2_SERVER_HOME}/repository/deployment/server/executionplans ${USER_HOME}/wso2-tmp \ 106 | && rm -f ${WSO2_SERVER_ZIP}.zip 107 | 108 | # remove unnecesary packages 109 | RUN apk del netcat-openbsd 110 | 111 | # set the user and work directory 112 | USER ${USER_ID} 113 | WORKDIR ${USER_HOME} 114 | 115 | # set environment variables 116 | ENV WORKING_DIRECTORY=${USER_HOME} \ 117 | WSO2_SERVER_HOME=${WSO2_SERVER_HOME} 118 | 119 | # expose ports 120 | EXPOSE 9763 9443 9999 11111 8280 8243 5672 9711 9611 9099 121 | 122 | # initiate container and start WSO2 Carbon server 123 | ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] 124 | -------------------------------------------------------------------------------- /dockerfiles/alpine/apim-acp/Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # 17 | # ------------------------------------------------------------------------ 18 | 19 | # set base Docker image to Alpine 20 | FROM alpine:3.21.3 21 | 22 | ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' 23 | 24 | # install dependencies 25 | RUN apk add --no-cache tzdata musl-locales musl-locales-lang bash libxml2-utils netcat-openbsd \ 26 | && rm -rf /var/cache/apk/* 27 | 28 | ENV JAVA_VERSION=jdk-21.0.5+11 29 | ENV JAVA_HOME=/opt/java/openjdk \ 30 | PATH="/opt/java/openjdk/bin:$PATH" 31 | 32 | # install Temurin OpenJDK 21 33 | RUN set -eux; \ 34 | ARCH="$(apk --print-arch)"; \ 35 | case "${ARCH}" in \ 36 | aarch64) \ 37 | ESUM='f22e32b869dd0e5e3f248646f62bffaa307b360299488ac8764e622923d7e747'; \ 38 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_aarch64_alpine-linux_hotspot_21.0.5_11.tar.gz'; \ 39 | ;; \ 40 | x86_64) \ 41 | ESUM='8da7da49101d45f646272616f20e8b10d57472bbf5961d64ffb07d7ba93c6909'; \ 42 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_x64_alpine-linux_hotspot_21.0.5_11.tar.gz'; \ 43 | ;; \ 44 | *) \ 45 | echo "Unsupported arch: ${ARCH}"; \ 46 | exit 1; \ 47 | ;; \ 48 | esac; \ 49 | wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ 50 | echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ 51 | mkdir -p /opt/java/openjdk; \ 52 | tar --extract \ 53 | --file /tmp/openjdk.tar.gz \ 54 | --directory /opt/java/openjdk \ 55 | --strip-components 1 \ 56 | --no-same-owner \ 57 | ; \ 58 | rm -rf /tmp/openjdk.tar.gz; 59 | 60 | 61 | LABEL maintainer="WSO2 Docker Maintainers " \ 62 | com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.6.0.1" 63 | 64 | # set Docker image build arguments 65 | # build arguments for user/group configurations 66 | ARG USER=wso2carbon 67 | ARG USER_ID=10001 68 | ARG USER_GROUP=wso2 69 | ARG USER_GROUP_ID=10001 70 | ARG USER_HOME=/home/${USER} 71 | # build arguments for WSO2 product installation 72 | ARG WSO2_SERVER_NAME=wso2am-acp 73 | ARG WSO2_SERVER_VERSION=4.6.0 74 | ARG WSO2_SERVER_ZIP_VERSION=${WSO2_SERVER_VERSION} 75 | ARG WSO2_SERVER_REPOSITORY=product-apim 76 | ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} 77 | ARG WSO2_SERVER_ZIP=${WSO2_SERVER_NAME}-${WSO2_SERVER_ZIP_VERSION} 78 | ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} 79 | ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_ZIP_VERSION}/${WSO2_SERVER_ZIP}.zip 80 | # build argument for MOTD 81 | ARG MOTD='printf "\n\ 82 | Welcome to WSO2 Docker Resources \n\ 83 | --------------------------------- \n\ 84 | This Docker container comprises of a WSO2 product, running with its latest GA release \n\ 85 | which is under the Apache License, Version 2.0. \n\ 86 | Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n"' 87 | ENV ENV=${USER_HOME}"/.ashrc" 88 | 89 | # create the non-root user and group and set MOTD login message 90 | RUN \ 91 | addgroup -S -g ${USER_GROUP_ID} ${USER_GROUP} \ 92 | && adduser -S -u ${USER_ID} -h ${USER_HOME} -G ${USER_GROUP} ${USER} \ 93 | && echo ${MOTD} > "${ENV}" 94 | 95 | # copy init script to user home 96 | COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ 97 | 98 | # add the WSO2 product distribution to user's home directory 99 | RUN \ 100 | wget -O ${WSO2_SERVER_ZIP}.zip "${WSO2_SERVER_DIST_URL}" \ 101 | && unzip -d ${USER_HOME} ${WSO2_SERVER_ZIP}.zip \ 102 | && EXTRACTED_DIR=$(ls -1 ${USER_HOME} | grep "^${WSO2_SERVER_NAME}-" | head -1) \ 103 | && if [ "${EXTRACTED_DIR}" != "${WSO2_SERVER}" ]; then mv ${USER_HOME}/${EXTRACTED_DIR} ${USER_HOME}/${WSO2_SERVER}; fi \ 104 | && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ 105 | && mkdir ${USER_HOME}/wso2-tmp \ 106 | && bash -c 'mkdir -p ${USER_HOME}/solr/{indexed-data,database}' \ 107 | && chown wso2carbon:wso2 -R ${USER_HOME}/solr \ 108 | && cp -r ${WSO2_SERVER_HOME}/repository/deployment/server/executionplans ${USER_HOME}/wso2-tmp \ 109 | && rm -f ${WSO2_SERVER_ZIP}.zip 110 | 111 | # remove unnecesary packages 112 | RUN apk del netcat-openbsd 113 | 114 | # set the user and work directory 115 | USER ${USER_ID} 116 | WORKDIR ${USER_HOME} 117 | 118 | # set environment variables 119 | ENV WORKING_DIRECTORY=${USER_HOME} \ 120 | WSO2_SERVER_HOME=${WSO2_SERVER_HOME} 121 | 122 | # expose ports 123 | EXPOSE 9611 9711 5672 9443 9763 124 | 125 | # initiate container and start WSO2 Carbon server 126 | ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] 127 | -------------------------------------------------------------------------------- /dockerfiles/alpine/apim-tm/Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # 17 | # ------------------------------------------------------------------------ 18 | 19 | # set base Docker image to Alpine 20 | FROM alpine:3.21.3 21 | 22 | ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' 23 | 24 | # install dependencies 25 | RUN apk add --no-cache tzdata musl-locales musl-locales-lang bash libxml2-utils netcat-openbsd \ 26 | && rm -rf /var/cache/apk/* 27 | 28 | ENV JAVA_VERSION=jdk-21.0.5+11 29 | ENV JAVA_HOME=/opt/java/openjdk \ 30 | PATH="/opt/java/openjdk/bin:$PATH" 31 | 32 | # install Temurin OpenJDK 21 33 | RUN set -eux; \ 34 | ARCH="$(apk --print-arch)"; \ 35 | case "${ARCH}" in \ 36 | aarch64) \ 37 | ESUM='f22e32b869dd0e5e3f248646f62bffaa307b360299488ac8764e622923d7e747'; \ 38 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_aarch64_alpine-linux_hotspot_21.0.5_11.tar.gz'; \ 39 | ;; \ 40 | x86_64) \ 41 | ESUM='8da7da49101d45f646272616f20e8b10d57472bbf5961d64ffb07d7ba93c6909'; \ 42 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_x64_alpine-linux_hotspot_21.0.5_11.tar.gz'; \ 43 | ;; \ 44 | *) \ 45 | echo "Unsupported arch: ${ARCH}"; \ 46 | exit 1; \ 47 | ;; \ 48 | esac; \ 49 | wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ 50 | echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ 51 | mkdir -p /opt/java/openjdk; \ 52 | tar --extract \ 53 | --file /tmp/openjdk.tar.gz \ 54 | --directory /opt/java/openjdk \ 55 | --strip-components 1 \ 56 | --no-same-owner \ 57 | ; \ 58 | rm -rf /tmp/openjdk.tar.gz; 59 | 60 | 61 | LABEL maintainer="WSO2 Docker Maintainers " \ 62 | com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.6.0.1" 63 | 64 | # set Docker image build arguments 65 | # build arguments for user/group configurations 66 | ARG USER=wso2carbon 67 | ARG USER_ID=10001 68 | ARG USER_GROUP=wso2 69 | ARG USER_GROUP_ID=10001 70 | ARG USER_HOME=/home/${USER} 71 | # build arguments for WSO2 product installation 72 | ARG WSO2_SERVER_NAME=wso2am-tm 73 | ARG WSO2_SERVER_VERSION=4.6.0 74 | ARG WSO2_SERVER_ZIP_VERSION=${WSO2_SERVER_VERSION} 75 | ARG WSO2_SERVER_REPOSITORY=product-apim 76 | ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} 77 | ARG WSO2_SERVER_ZIP=${WSO2_SERVER_NAME}-${WSO2_SERVER_ZIP_VERSION} 78 | ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} 79 | ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_ZIP_VERSION}/${WSO2_SERVER_ZIP}.zip 80 | # build argument for MOTD 81 | ARG MOTD='printf "\n\ 82 | Welcome to WSO2 Docker Resources \n\ 83 | --------------------------------- \n\ 84 | This Docker container comprises of a WSO2 product, running with its latest GA release \n\ 85 | which is under the Apache License, Version 2.0. \n\ 86 | Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n"' 87 | ENV ENV=${USER_HOME}"/.ashrc" 88 | 89 | # create the non-root user and group and set MOTD login message 90 | RUN \ 91 | addgroup -S -g ${USER_GROUP_ID} ${USER_GROUP} \ 92 | && adduser -S -u ${USER_ID} -h ${USER_HOME} -G ${USER_GROUP} ${USER} \ 93 | && echo ${MOTD} > "${ENV}" 94 | 95 | # copy init script to user home 96 | COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ 97 | 98 | # add the WSO2 product distribution to user's home directory 99 | RUN \ 100 | wget -O ${WSO2_SERVER_ZIP}.zip "${WSO2_SERVER_DIST_URL}" \ 101 | && unzip -d ${USER_HOME} ${WSO2_SERVER_ZIP}.zip \ 102 | && EXTRACTED_DIR=$(ls -1 ${USER_HOME} | grep "^${WSO2_SERVER_NAME}-" | head -1) \ 103 | && if [ "${EXTRACTED_DIR}" != "${WSO2_SERVER}" ]; then mv ${USER_HOME}/${EXTRACTED_DIR} ${USER_HOME}/${WSO2_SERVER}; fi \ 104 | && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ 105 | && mkdir ${USER_HOME}/wso2-tmp \ 106 | && bash -c 'mkdir -p ${USER_HOME}/solr/{indexed-data,database}' \ 107 | && chown wso2carbon:wso2 -R ${USER_HOME}/solr \ 108 | && cp -r ${WSO2_SERVER_HOME}/repository/deployment/server/executionplans ${USER_HOME}/wso2-tmp \ 109 | && rm -f ${WSO2_SERVER_ZIP}.zip 110 | 111 | # remove unnecesary packages 112 | RUN apk del netcat-openbsd 113 | 114 | # set the user and work directory 115 | USER ${USER_ID} 116 | WORKDIR ${USER_HOME} 117 | 118 | # set environment variables 119 | ENV WORKING_DIRECTORY=${USER_HOME} \ 120 | WSO2_SERVER_HOME=${WSO2_SERVER_HOME} 121 | 122 | # expose ports 123 | EXPOSE 9763 9443 9999 11111 8280 8243 5672 9711 9611 9099 124 | 125 | # initiate container and start WSO2 Carbon server 126 | ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] 127 | -------------------------------------------------------------------------------- /dockerfiles/alpine/apim-universal-gw/Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # 17 | # ------------------------------------------------------------------------ 18 | 19 | # set base Docker image to Alpine 20 | FROM alpine:3.21.3 21 | 22 | ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' 23 | 24 | # install dependencies 25 | RUN apk add --no-cache tzdata musl-locales musl-locales-lang bash libxml2-utils netcat-openbsd \ 26 | && rm -rf /var/cache/apk/* 27 | 28 | ENV JAVA_VERSION=jdk-21.0.5+11 29 | ENV JAVA_HOME=/opt/java/openjdk \ 30 | PATH="/opt/java/openjdk/bin:$PATH" 31 | 32 | # install Temurin OpenJDK 21 33 | RUN set -eux; \ 34 | ARCH="$(apk --print-arch)"; \ 35 | case "${ARCH}" in \ 36 | aarch64) \ 37 | ESUM='f22e32b869dd0e5e3f248646f62bffaa307b360299488ac8764e622923d7e747'; \ 38 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_aarch64_alpine-linux_hotspot_21.0.5_11.tar.gz'; \ 39 | ;; \ 40 | x86_64) \ 41 | ESUM='8da7da49101d45f646272616f20e8b10d57472bbf5961d64ffb07d7ba93c6909'; \ 42 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_x64_alpine-linux_hotspot_21.0.5_11.tar.gz'; \ 43 | ;; \ 44 | *) \ 45 | echo "Unsupported arch: ${ARCH}"; \ 46 | exit 1; \ 47 | ;; \ 48 | esac; \ 49 | wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ 50 | echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ 51 | mkdir -p /opt/java/openjdk; \ 52 | tar --extract \ 53 | --file /tmp/openjdk.tar.gz \ 54 | --directory /opt/java/openjdk \ 55 | --strip-components 1 \ 56 | --no-same-owner \ 57 | ; \ 58 | rm -rf /tmp/openjdk.tar.gz; 59 | 60 | 61 | LABEL maintainer="WSO2 Docker Maintainers " \ 62 | com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.6.0.1" 63 | 64 | # set Docker image build arguments 65 | # build arguments for user/group configurations 66 | ARG USER=wso2carbon 67 | ARG USER_ID=10001 68 | ARG USER_GROUP=wso2 69 | ARG USER_GROUP_ID=10001 70 | ARG USER_HOME=/home/${USER} 71 | # build arguments for WSO2 product installation 72 | ARG WSO2_SERVER_NAME=wso2am-universal-gw 73 | ARG WSO2_SERVER_VERSION=4.6.0 74 | ARG WSO2_SERVER_ZIP_VERSION=${WSO2_SERVER_VERSION} 75 | ARG WSO2_SERVER_REPOSITORY=product-apim 76 | ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} 77 | ARG WSO2_SERVER_ZIP=${WSO2_SERVER_NAME}-${WSO2_SERVER_ZIP_VERSION} 78 | ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} 79 | ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_ZIP_VERSION}/${WSO2_SERVER_ZIP}.zip 80 | # build argument for MOTD 81 | ARG MOTD='printf "\n\ 82 | Welcome to WSO2 Docker Resources \n\ 83 | --------------------------------- \n\ 84 | This Docker container comprises of a WSO2 product, running with its latest GA release \n\ 85 | which is under the Apache License, Version 2.0. \n\ 86 | Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n"' 87 | ENV ENV=${USER_HOME}"/.ashrc" 88 | 89 | # create the non-root user and group and set MOTD login message 90 | RUN \ 91 | addgroup -S -g ${USER_GROUP_ID} ${USER_GROUP} \ 92 | && adduser -S -u ${USER_ID} -h ${USER_HOME} -G ${USER_GROUP} ${USER} \ 93 | && echo ${MOTD} > "${ENV}" 94 | 95 | # copy init script to user home 96 | COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ 97 | 98 | # add the WSO2 product distribution to user's home directory 99 | RUN \ 100 | wget -O ${WSO2_SERVER_ZIP}.zip "${WSO2_SERVER_DIST_URL}" \ 101 | && unzip -d ${USER_HOME} ${WSO2_SERVER_ZIP}.zip \ 102 | && EXTRACTED_DIR=$(ls -1 ${USER_HOME} | grep "^${WSO2_SERVER_NAME}-" | head -1) \ 103 | && if [ "${EXTRACTED_DIR}" != "${WSO2_SERVER}" ]; then mv ${USER_HOME}/${EXTRACTED_DIR} ${USER_HOME}/${WSO2_SERVER}; fi \ 104 | && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ 105 | && mkdir ${USER_HOME}/wso2-tmp \ 106 | && bash -c 'mkdir -p ${USER_HOME}/solr/{indexed-data,database}' \ 107 | && chown wso2carbon:wso2 -R ${USER_HOME}/solr \ 108 | && cp -r ${WSO2_SERVER_HOME}/repository/deployment/server/synapse-configs ${USER_HOME}/wso2-tmp \ 109 | && rm -f ${WSO2_SERVER_ZIP}.zip 110 | 111 | # remove unnecesary packages 112 | RUN apk del netcat-openbsd 113 | 114 | # set the user and work directory 115 | USER ${USER_ID} 116 | WORKDIR ${USER_HOME} 117 | 118 | # set environment variables 119 | ENV WORKING_DIRECTORY=${USER_HOME} \ 120 | WSO2_SERVER_HOME=${WSO2_SERVER_HOME} 121 | 122 | # expose ports 123 | EXPOSE 8280 8243 9763 9443 9099 8099 9021 8021 124 | 125 | # initiate container and start WSO2 Carbon server 126 | ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] 127 | -------------------------------------------------------------------------------- /dockerfiles/alpine/apim/Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2023 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # 17 | # ------------------------------------------------------------------------ 18 | 19 | # set base Docker image to Alpine 20 | FROM alpine:3.21.3 21 | 22 | ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' 23 | 24 | # install dependencies 25 | RUN apk add --no-cache tzdata musl-locales musl-locales-lang bash libxml2-utils netcat-openbsd \ 26 | && rm -rf /var/cache/apk/* 27 | 28 | ENV JAVA_VERSION=jdk-21.0.5+11 29 | ENV JAVA_HOME=/opt/java/openjdk \ 30 | PATH="/opt/java/openjdk/bin:$PATH" 31 | 32 | # install Temurin OpenJDK 21 33 | RUN set -eux; \ 34 | ARCH="$(apk --print-arch)"; \ 35 | case "${ARCH}" in \ 36 | aarch64) \ 37 | ESUM='f22e32b869dd0e5e3f248646f62bffaa307b360299488ac8764e622923d7e747'; \ 38 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_aarch64_alpine-linux_hotspot_21.0.5_11.tar.gz'; \ 39 | ;; \ 40 | x86_64) \ 41 | ESUM='8da7da49101d45f646272616f20e8b10d57472bbf5961d64ffb07d7ba93c6909'; \ 42 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_x64_alpine-linux_hotspot_21.0.5_11.tar.gz'; \ 43 | ;; \ 44 | *) \ 45 | echo "Unsupported arch: ${ARCH}"; \ 46 | exit 1; \ 47 | ;; \ 48 | esac; \ 49 | wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ 50 | echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ 51 | mkdir -p /opt/java/openjdk; \ 52 | tar --extract \ 53 | --file /tmp/openjdk.tar.gz \ 54 | --directory /opt/java/openjdk \ 55 | --strip-components 1 \ 56 | --no-same-owner \ 57 | ; \ 58 | rm -rf /tmp/openjdk.tar.gz; 59 | 60 | 61 | LABEL maintainer="WSO2 Docker Maintainers " \ 62 | com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.6.0.1" 63 | 64 | # set Docker image build arguments 65 | # build arguments for user/group configurations 66 | ARG USER=wso2carbon 67 | ARG USER_ID=10001 68 | ARG USER_GROUP=wso2 69 | ARG USER_GROUP_ID=10001 70 | ARG USER_HOME=/home/${USER} 71 | # build arguments for WSO2 product installation 72 | ARG WSO2_SERVER_NAME=wso2am 73 | ARG WSO2_SERVER_VERSION=4.6.0 74 | ARG WSO2_SERVER_ZIP_VERSION=${WSO2_SERVER_VERSION} 75 | ARG WSO2_SERVER_REPOSITORY=product-apim 76 | ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} 77 | ARG WSO2_SERVER_ZIP=${WSO2_SERVER_NAME}-${WSO2_SERVER_ZIP_VERSION} 78 | ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} 79 | ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_ZIP_VERSION}/${WSO2_SERVER_ZIP}.zip 80 | # build argument for MOTD 81 | ARG MOTD='printf "\n\ 82 | Welcome to WSO2 Docker Resources \n\ 83 | --------------------------------- \n\ 84 | This Docker container comprises of a WSO2 product, running with its latest GA release \n\ 85 | which is under the Apache License, Version 2.0. \n\ 86 | Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n"' 87 | ENV ENV=${USER_HOME}"/.ashrc" 88 | 89 | # create the non-root user and group and set MOTD login message 90 | RUN \ 91 | addgroup -S -g ${USER_GROUP_ID} ${USER_GROUP} \ 92 | && adduser -S -u ${USER_ID} -h ${USER_HOME} -G ${USER_GROUP} ${USER} \ 93 | && echo ${MOTD} > "${ENV}" 94 | 95 | # copy init script to user home 96 | COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ 97 | 98 | # add the WSO2 product distribution to user's home directory 99 | RUN \ 100 | wget -O ${WSO2_SERVER_ZIP}.zip "${WSO2_SERVER_DIST_URL}" \ 101 | && unzip -d ${USER_HOME} ${WSO2_SERVER_ZIP}.zip \ 102 | && EXTRACTED_DIR=$(ls -1 ${USER_HOME} | grep "^${WSO2_SERVER_NAME}-" | head -1) \ 103 | && if [ "${EXTRACTED_DIR}" != "${WSO2_SERVER}" ]; then mv ${USER_HOME}/${EXTRACTED_DIR} ${USER_HOME}/${WSO2_SERVER}; fi \ 104 | && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ 105 | && mkdir ${USER_HOME}/wso2-tmp \ 106 | && bash -c 'mkdir -p ${USER_HOME}/solr/{indexed-data,database}' \ 107 | && chown wso2carbon:wso2 -R ${USER_HOME}/solr \ 108 | && cp -r ${WSO2_SERVER_HOME}/repository/deployment/server/synapse-configs ${USER_HOME}/wso2-tmp \ 109 | && cp -r ${WSO2_SERVER_HOME}/repository/deployment/server/executionplans ${USER_HOME}/wso2-tmp \ 110 | && rm -f ${WSO2_SERVER_ZIP}.zip 111 | 112 | # remove unnecesary packages 113 | RUN apk del netcat-openbsd 114 | 115 | # set the user and work directory 116 | USER ${USER_ID} 117 | WORKDIR ${USER_HOME} 118 | 119 | # set environment variables 120 | ENV WORKING_DIRECTORY=${USER_HOME} \ 121 | WSO2_SERVER_HOME=${WSO2_SERVER_HOME} 122 | 123 | # expose ports 124 | EXPOSE 9763 9443 9999 11111 8280 8243 5672 9711 9611 9099 125 | 126 | # initiate container and start WSO2 Carbon server 127 | ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] 128 | -------------------------------------------------------------------------------- /dockerfiles/ubuntu/apim/README.md: -------------------------------------------------------------------------------- 1 | # Dockerfile for WSO2 API Manager # 2 | 3 | This section defines the step-by-step instructions to build an [Ubuntu](https://hub.docker.com/_/ubuntu/) Linux based Docker image for WSO2 API Manager 4.6.0. 4 | 5 | ## Prerequisites 6 | 7 | * [Docker](https://www.docker.com/get-docker) v20.10.x or above 8 | * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client 9 | 10 | ## How to build an image and run 11 | 12 | #### 1. Checkout this repository into your local machine using the following Git client command. 13 | 14 | ``` 15 | git clone https://github.com/wso2/docker-apim.git 16 | ``` 17 | 18 | > The local copy of the `dockerfiles/ubuntu/apim` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. 19 | 20 | #### 2. Build the Docker image. 21 | 22 | - Download wso2am-4.6.0.zip from [here](https://wso2.com/api-management/install/) 23 | - Host the product pack using a webserver. 24 | - Navigate to `` directory.
25 | - Execute `docker build` command as shown below. 26 | ``` 27 | docker build -t wso2am:4.6.0 . 28 | ``` 29 | 30 | > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. 31 | 32 | #### 3. Running the Docker image. 33 | 34 | ``` 35 | docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.6.0 36 | ``` 37 | 38 | > Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. 39 | You may map other container service ports, which have been exposed to Docker host ports, as desired. 40 | 41 | #### 4. Accessing management console. 42 | 43 | - To access the management console, use the docker host IP and port 9443. 44 | + `https://:9443/carbon` 45 | 46 | > In here, refers to hostname or IP of the host machine on top of which containers are spawned. 47 | 48 | ## How to update configurations 49 | 50 | Configurations would lie on the Docker host machine and they can be volume mounted to the container.
51 | As an example, steps required to change the port offset using `deployment.toml` is as follows: 52 | 53 | #### 1. Stop the API Manager container if it's already running. 54 | 55 | In WSO2 API Manager version 4.6.0 product distribution, `deployment.toml` configuration file
56 | can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
57 | referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. 58 | 59 | #### 2. Grant read permission to `other` users for `/deployment.toml`. 60 | 61 | ``` 62 | chmod o+r /deployment.toml 63 | ``` 64 | 65 | #### 3. Run the image by mounting the file to container as follows: 66 | 67 | ``` 68 | docker run -it \ 69 | -p 9444:9444 \ 70 | -p 8244:8244 \ 71 | --volume /deployment.toml:/deployment.toml \ 72 | wso2am:4.6.0 73 | ``` 74 | 75 | > In here, refers to /home/wso2carbon/wso2am-4.6.0/repository/conf folder of the container. 76 | 77 | ## How to build a Docker image with multi architecture support 78 | 79 | The above wso2am:4.6.0 image will only be supported for the CPU architecture of your current machine. Docker buildx plugin can be used to build wso2am:4.6.0 image to support any CPU architecture. 80 | 81 | #### 1. Install [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) 82 | 83 | #### 2. Install [QEMU Emulators](https://github.com/tonistiigi/binfmt) 84 | ``` 85 | docker run -it --rm --privileged tonistiigi/binfmt --install all 86 | ``` 87 | 88 | #### 3. Create, switch and inspect a new builder 89 | ``` 90 | docker buildx create --name wso2ambuilder 91 | ``` 92 | ``` 93 | docker buildx use wso2ambuilder 94 | ``` 95 | ``` 96 | docker buildx inspect --bootstrap 97 | ``` 98 | #### 4. Build and push 99 | 100 | ``` 101 | docker buildx build --platform linux/amd64,linux/arm64 -t /wso2am:4.6.0 --push . 102 | ``` 103 | 104 | > - Here is a valid Docker or Dockerhub username. 105 | > - Use command "docker login" to authenticate first if it fails to push. 106 | > - You can specify any number of platforms to support --platform flag 107 | > - Use command "docker buildx ls" to see list of existing builders and supported platforms. 108 | > - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only 109 | 110 | #### 5. Run 111 | ``` 112 | docker run -it -p 9443:9443 -p 8243:8243 /wso2am:4.6.0 113 | ``` 114 | > Docker will pull the suitable image for the architecture and run 115 | 116 | > **Note** 117 | > If you are using Rancher to run the Docker image, you will not be able to use port 9443, which is already allocated by Rancher. As a workaround, you can follow the instructions given in [How to update configurations](#how-to-update-configurations) to run the APIM image in a different port. 118 | 119 | ## WSO2 Private Docker images 120 | 121 | If you have a valid WSO2 subscription you can have access to WSO2 private Docker images. These images will get updated frequently with bug fixes, security fixes and new improvements. To view available images visit [WSO2 Docker Repositories](https://docker.wso2.com/) 122 | 123 | ## Docker command usage references 124 | 125 | * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) 126 | * [Docker run command reference](https://docs.docker.com/engine/reference/run/) 127 | * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) 128 | * [Docker multi architecture build reference](https://docs.docker.com/desktop/multi-arch/) 129 | * [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) 130 | -------------------------------------------------------------------------------- /dockerfiles/rocky/apim/README.md: -------------------------------------------------------------------------------- 1 | # Dockerfile for WSO2 API Manager # 2 | 3 | This section defines the step-by-step instructions to build an [Rocky Linux](https://hub.docker.com/_/rockylinux/) based Docker image for WSO2 API Manager 4.6.0. 4 | 5 | ## Prerequisites 6 | 7 | * [Docker](https://www.docker.com/get-docker) v20.10.x or above 8 | * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client 9 | 10 | 11 | ## How to build an image and run 12 | 13 | #### 1. Checkout this repository into your local machine using the following Git client command. 14 | 15 | ``` 16 | git clone https://github.com/wso2/docker-apim.git 17 | ``` 18 | 19 | > The local copy of the `dockerfiles/rocky/apim` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. 20 | 21 | #### 2. Build the Docker image. 22 | 23 | - Download wso2am-4.6.0.zip from [here](https://wso2.com/api-management/install/) 24 | - Host the product pack using a webserver. 25 | - Navigate to `` directory.
26 | - Execute `docker build` command as shown below. 27 | 28 | ``` 29 | docker build -t wso2am:4.6.0-rocky . 30 | ``` 31 | 32 | > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. 33 | 34 | #### 3. Running the Docker image. 35 | 36 | ``` 37 | docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.6.0-rocky 38 | ``` 39 | 40 | > Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. 41 | You may map other container service ports, which have been exposed to Docker host ports, as desired. 42 | 43 | #### 4. Accessing management console. 44 | 45 | - To access the management console, use the docker host IP and port 9443. 46 | + `https://:9443/carbon` 47 | 48 | > In here, refers to hostname or IP of the host machine on top of which containers are spawned. 49 | 50 | ## How to update configurations 51 | 52 | Configurations would lie on the Docker host machine and they can be volume mounted to the container.
53 | As an example, steps required to change the port offset using `deployment.toml` is as follows: 54 | 55 | #### 1. Stop the API Manager container if it's already running. 56 | 57 | In WSO2 API Manager version 4.6.0 product distribution, `deployment.toml` configuration file
58 | can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
59 | referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. 60 | 61 | #### 2. Grant read permission to `other` users for `/deployment.toml`. 62 | 63 | ``` 64 | chmod o+r /deployment.toml 65 | ``` 66 | 67 | #### 3. Run the image by mounting the file to container as follows: 68 | 69 | ``` 70 | docker run -it \ 71 | -p 9444:9444 \ 72 | -p 8244:8244 \ 73 | --volume /deployment.toml:/deployment.toml \ 74 | wso2am:4.6.0-rocky 75 | ``` 76 | 77 | > In here, refers to /home/wso2carbon/wso2am-4.6.0/repository/conf folder of the container. 78 | 79 | ## How to build a Docker image with multi architecture support 80 | 81 | The above wso2am:4.6.0-rocky image will only be supported for the CPU architecture of your current machine. Docker buildx plugin can be used to build wso2am:4.6.0-rocky image to support any CPU architecture. 82 | 83 | #### 1. Install [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) 84 | 85 | #### 2. Install [QEMU Emulators](https://github.com/tonistiigi/binfmt) 86 | ``` 87 | docker run -it --rm --privileged tonistiigi/binfmt --install all 88 | ``` 89 | 90 | #### 3. Create, switch and inspect a new builder 91 | ``` 92 | docker buildx create --name wso2ambuilder 93 | ``` 94 | ``` 95 | docker buildx use wso2ambuilder 96 | ``` 97 | ``` 98 | docker buildx inspect --bootstrap 99 | ``` 100 | #### 4. Build and push 101 | 102 | ``` 103 | docker buildx build --platform linux/amd64,linux/arm64 -t /wso2am:4.6.0-rocky --push . 104 | ``` 105 | 106 | > - Here is a valid Docker or Dockerhub username. 107 | > - Use command "docker login" to authenticate first if it fails to push. 108 | > - You can specify any number of platforms to support --platform flag 109 | > - Use command "docker buildx ls" to see list of existing builders and supported platforms. 110 | > - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only 111 | 112 | #### 5. Run 113 | ``` 114 | docker run -it -p 9443:9443 -p 8243:8243 /wso2am:4.6.0-rocky 115 | ``` 116 | > Docker will pull the suitable image for the architecture and run 117 | 118 | > **Note** 119 | > If you are using Rancher to run the Docker image, you will not be able to use port 9443, which is already allocated by Rancher. As a workaround, you can follow the instructions given in [How to update configurations](#how-to-update-configurations) to run the APIM image in a different port. 120 | 121 | ## WSO2 Private Docker images 122 | 123 | If you have a valid WSO2 subscription you can have access to WSO2 private Docker images. These images will get updated frequently with bug fixes, security fixes and new improvements. To view available images visit [WSO2 Docker Repositories](https://docker.wso2.com/) 124 | 125 | ## Docker command usage references 126 | 127 | * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) 128 | * [Docker run command reference](https://docs.docker.com/engine/reference/run/) 129 | * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) 130 | * [Docker multi architecture build reference](https://docs.docker.com/desktop/multi-arch/) 131 | * [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) 132 | -------------------------------------------------------------------------------- /dockerfiles/ubuntu/apim-acp/README.md: -------------------------------------------------------------------------------- 1 | # Dockerfile for WSO2 API Manager - API Control Plane # 2 | 3 | This section defines the step-by-step instructions to build an [Ubuntu](https://hub.docker.com/_/ubuntu/) Linux based Docker image for WSO2 API Manager - API Control Plane 4.6.0. 4 | 5 | ## Prerequisites 6 | 7 | * [Docker](https://www.docker.com/get-docker) v20.10.x or above 8 | * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client 9 | 10 | ## How to build an image and run 11 | 12 | #### 1. Checkout this repository into your local machine using the following Git client command. 13 | 14 | ``` 15 | git clone https://github.com/wso2/docker-apim.git 16 | ``` 17 | 18 | > The local copy of the `dockerfiles/ubuntu/apim-acp` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. 19 | 20 | #### 2. Build the Docker image. 21 | 22 | - Download wso2am-acp-4.6.0.zip from [here](https://wso2.com/api-management/install/) 23 | - Host the product pack using a webserver. 24 | - Navigate to `` directory.
25 | - Execute `docker build` command as shown below. 26 | ``` 27 | docker build -t wso2am-acp:4.6.0 . 28 | ``` 29 | 30 | > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. 31 | 32 | #### 3. Running the Docker image. 33 | 34 | ``` 35 | docker run -it -p 9443:9443 -p 9611:9611 -p 9711:9711 -p 5672:5672 wso2am-acp:4.6.0 36 | ``` 37 | 38 | > Here, only port 9443 (HTTPS servlet transport) and ports 9611, 9711, 5672 have been mapped to Docker host ports. 39 | You may map other container service ports, which have been exposed to Docker host ports, as desired. 40 | 41 | #### 4. Accessing management console. 42 | 43 | - To access the management console, use the docker host IP and port 9443. 44 | + `https://:9443/carbon` 45 | 46 | > In here, refers to hostname or IP of the host machine on top of which containers are spawned. 47 | 48 | ## How to update configurations 49 | 50 | Configurations would lie on the Docker host machine and they can be volume mounted to the container.
51 | As an example, steps required to change the port offset using `deployment.toml` is as follows: 52 | 53 | #### 1. Stop the API Manager container if it's already running. 54 | 55 | In WSO2 API Manager version 4.6.0 product distribution, `deployment.toml` configuration file
56 | can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
57 | referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. 58 | 59 | #### 2. Grant read permission to `other` users for `/deployment.toml`. 60 | 61 | ``` 62 | chmod o+r /deployment.toml 63 | ``` 64 | 65 | #### 3. Run the image by mounting the file to container as follows: 66 | 67 | ``` 68 | docker run -it \ 69 | -p 9444:9444 \ 70 | --volume /deployment.toml:/deployment.toml \ 71 | wso2am-acp:4.6.0 72 | ``` 73 | 74 | > In here, refers to /home/wso2carbon/wso2am-acp-4.6.0/repository/conf folder of the container. 75 | 76 | ## How to build a Docker image with multi architecture support 77 | 78 | The above wso2am-acp:4.6.0 image will only be supported for the CPU architecture of your current machine. Docker buildx plugin can be used to build wso2am-acp:4.6.0 image to support any CPU architecture. 79 | 80 | #### 1. Install [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) 81 | 82 | #### 2. Install [QEMU Emulators](https://github.com/tonistiigi/binfmt) 83 | ``` 84 | docker run -it --rm --privileged tonistiigi/binfmt --install all 85 | ``` 86 | 87 | #### 3. Create, switch and inspect a new builder 88 | ``` 89 | docker buildx create --name wso2ambuilder 90 | ``` 91 | ``` 92 | docker buildx use wso2ambuilder 93 | ``` 94 | ``` 95 | docker buildx inspect --bootstrap 96 | ``` 97 | #### 4. Build and push 98 | 99 | ``` 100 | docker buildx build --platform linux/amd64,linux/arm64 -t /wso2am-acp:4.6.0 --push . 101 | ``` 102 | 103 | > - Here is a valid Docker or Dockerhub username. 104 | > - Use command "docker login" to authenticate first if it fails to push. 105 | > - You can specify any number of platforms to support --platform flag 106 | > - Use command "docker buildx ls" to see list of existing builders and supported platforms. 107 | > - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only 108 | 109 | #### 5. Run 110 | ``` 111 | docker run -it -p 9443:9443 -p 8243:8243 /wso2am-acp:4.6.0 112 | ``` 113 | > Docker will pull the suitable image for the architecture and run 114 | 115 | > **Note** 116 | > If you are using Rancher to run the Docker image, you will not be able to use port 9443, which is already allocated by Rancher. As a workaround, you can follow the instructions given in [How to update configurations](#how-to-update-configurations) to run the APIM image in a different port. 117 | 118 | ## WSO2 Private Docker images 119 | 120 | If you have a valid WSO2 subscription you can have access to WSO2 private Docker images. These images will get updated frequently with bug fixes, security fixes and new improvements. To view available images visit [WSO2 Docker Repositories](https://docker.wso2.com/) 121 | 122 | ## Docker command usage references 123 | 124 | * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) 125 | * [Docker run command reference](https://docs.docker.com/engine/reference/run/) 126 | * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) 127 | * [Docker multi architecture build reference](https://docs.docker.com/desktop/multi-arch/) 128 | * [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) 129 | -------------------------------------------------------------------------------- /dockerfiles/ubuntu/apim-tm/README.md: -------------------------------------------------------------------------------- 1 | # Dockerfile for WSO2 API Manager - Traffice Manager # 2 | 3 | This section defines the step-by-step instructions to build an [Ubuntu](https://hub.docker.com/_/ubuntu/) Linux based Docker image for WSO2 API Manager - Traffic Manager 4.6.0. 4 | 5 | ## Prerequisites 6 | 7 | * [Docker](https://www.docker.com/get-docker) v20.10.x or above 8 | * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client 9 | 10 | ## How to build an image and run 11 | 12 | #### 1. Checkout this repository into your local machine using the following Git client command. 13 | 14 | ``` 15 | git clone https://github.com/wso2/docker-apim.git 16 | ``` 17 | 18 | > The local copy of the `dockerfiles/ubuntu/apim-tm` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. 19 | 20 | #### 2. Build the Docker image. 21 | 22 | - Download wso2am-tm-4.6.0.zip from [here](https://wso2.com/api-management/install/) 23 | - Host the product pack using a webserver. 24 | - Navigate to `` directory.
25 | - Execute `docker build` command as shown below. 26 | ``` 27 | docker build -t wso2am-tm:4.6.0 . 28 | ``` 29 | 30 | > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. 31 | 32 | #### 3. Running the Docker image. 33 | 34 | ``` 35 | docker run -it -p 9443:9443 -p 9611:9611 -p 5672:5672 -p 9711:9711 wso2am-tm:4.6.0 36 | ``` 37 | 38 | > Here, only port 9443 (HTTPS servlet transport) and ports 9611, 5672, 9711 have been mapped to Docker host ports. 39 | You may map other container service ports, which have been exposed to Docker host ports, as desired. 40 | 41 | #### 4. Accessing management console. 42 | 43 | - To access the management console, use the docker host IP and port 9443. 44 | + `https://:9443/carbon` 45 | 46 | > In here, refers to hostname or IP of the host machine on top of which containers are spawned. 47 | 48 | ## How to update configurations 49 | 50 | Configurations would lie on the Docker host machine and they can be volume mounted to the container.
51 | As an example, steps required to change the port offset using `deployment.toml` is as follows: 52 | 53 | #### 1. Stop the API Manager container if it's already running. 54 | 55 | In WSO2 API Manager version 4.6.0 product distribution, `deployment.toml` configuration file
56 | can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
57 | referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. 58 | 59 | #### 2. Grant read permission to `other` users for `/deployment.toml`. 60 | 61 | ``` 62 | chmod o+r /deployment.toml 63 | ``` 64 | 65 | #### 3. Run the image by mounting the file to container as follows: 66 | 67 | ``` 68 | docker run -it \ 69 | -p 9444:9444 \ 70 | -p 8244:8244 \ 71 | --volume /deployment.toml:/deployment.toml \ 72 | wso2am-tm:4.6.0 73 | ``` 74 | 75 | > In here, refers to /home/wso2carbon/wso2am-tm-4.6.0/repository/conf folder of the container. 76 | 77 | ## How to build a Docker image with multi architecture support 78 | 79 | The above wso2am-tm:4.6.0 image will only be supported for the CPU architecture of your current machine. Docker buildx plugin can be used to build wso2am-tm:4.6.0 image to support any CPU architecture. 80 | 81 | #### 1. Install [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) 82 | 83 | #### 2. Install [QEMU Emulators](https://github.com/tonistiigi/binfmt) 84 | ``` 85 | docker run -it --rm --privileged tonistiigi/binfmt --install all 86 | ``` 87 | 88 | #### 3. Create, switch and inspect a new builder 89 | ``` 90 | docker buildx create --name wso2ambuilder 91 | ``` 92 | ``` 93 | docker buildx use wso2ambuilder 94 | ``` 95 | ``` 96 | docker buildx inspect --bootstrap 97 | ``` 98 | #### 4. Build and push 99 | 100 | ``` 101 | docker buildx build --platform linux/amd64,linux/arm64 -t /wso2am-tm:4.6.0 --push . 102 | ``` 103 | 104 | > - Here is a valid Docker or Dockerhub username. 105 | > - Use command "docker login" to authenticate first if it fails to push. 106 | > - You can specify any number of platforms to support --platform flag 107 | > - Use command "docker buildx ls" to see list of existing builders and supported platforms. 108 | > - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only 109 | 110 | #### 5. Run 111 | ``` 112 | docker run -it -p 9443:9443 -p 8243:8243 /wso2am-tm:4.6.0 113 | ``` 114 | > Docker will pull the suitable image for the architecture and run 115 | 116 | > **Note** 117 | > If you are using Rancher to run the Docker image, you will not be able to use port 9443, which is already allocated by Rancher. As a workaround, you can follow the instructions given in [How to update configurations](#how-to-update-configurations) to run the APIM image in a different port. 118 | 119 | ## WSO2 Private Docker images 120 | 121 | If you have a valid WSO2 subscription you can have access to WSO2 private Docker images. These images will get updated frequently with bug fixes, security fixes and new improvements. To view available images visit [WSO2 Docker Repositories](https://docker.wso2.com/) 122 | 123 | ## Docker command usage references 124 | 125 | * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) 126 | * [Docker run command reference](https://docs.docker.com/engine/reference/run/) 127 | * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) 128 | * [Docker multi architecture build reference](https://docs.docker.com/desktop/multi-arch/) 129 | * [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) 130 | -------------------------------------------------------------------------------- /dockerfiles/rocky/apim-acp/README.md: -------------------------------------------------------------------------------- 1 | # Dockerfile for WSO2 API Manager - API Control Plane # 2 | 3 | This section defines the step-by-step instructions to build an [Rocky Linux](https://hub.docker.com/_/rockylinux/) based Docker image for WSO2 API Manager 4.6.0. 4 | 5 | ## Prerequisites 6 | 7 | * [Docker](https://www.docker.com/get-docker) v20.10.x or above 8 | * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client 9 | 10 | 11 | ## How to build an image and run 12 | 13 | #### 1. Checkout this repository into your local machine using the following Git client command. 14 | 15 | ``` 16 | git clone https://github.com/wso2/docker-apim.git 17 | ``` 18 | 19 | > The local copy of the `dockerfiles/rocky/apim-acp` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. 20 | 21 | #### 2. Build the Docker image. 22 | 23 | - Download wso2am-acp-4.6.0.zip from [here](https://wso2.com/api-management/install/) 24 | - Host the product pack using a webserver. 25 | - Navigate to `` directory.
26 | - Execute `docker build` command as shown below. 27 | 28 | ``` 29 | docker build -t wso2am-acp:4.6.0-rocky . 30 | ``` 31 | 32 | > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. 33 | 34 | #### 3. Running the Docker image. 35 | 36 | ``` 37 | docker run -it -p 9443:9443 -p 9611:9611 -p 9711:9711 -p 5672:5672 wso2am-acp:4.6.0-rocky 38 | ``` 39 | 40 | > Here, only port 9443 (HTTPS servlet transport) and ports 9611, 9711, 5672 have been mapped to Docker host ports. 41 | You may map other container service ports, which have been exposed to Docker host ports, as desired. 42 | 43 | #### 4. Accessing management console. 44 | 45 | - To access the management console, use the docker host IP and port 9443. 46 | + `https://:9443/carbon` 47 | 48 | > In here, refers to hostname or IP of the host machine on top of which containers are spawned. 49 | 50 | ## How to update configurations 51 | 52 | Configurations would lie on the Docker host machine and they can be volume mounted to the container.
53 | As an example, steps required to change the port offset using `deployment.toml` is as follows: 54 | 55 | #### 1. Stop the API Manager container if it's already running. 56 | 57 | In WSO2 API Manager version 4.6.0 product distribution, `deployment.toml` configuration file
58 | can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
59 | referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. 60 | 61 | #### 2. Grant read permission to `other` users for `/deployment.toml`. 62 | 63 | ``` 64 | chmod o+r /deployment.toml 65 | ``` 66 | 67 | #### 3. Run the image by mounting the file to container as follows: 68 | 69 | ``` 70 | docker run -it \ 71 | -p 9444:9444 \ 72 | --volume /deployment.toml:/deployment.toml \ 73 | wso2am-acp:4.6.0-rocky 74 | ``` 75 | 76 | > In here, refers to /home/wso2carbon/wso2am-acp-4.6.0/repository/conf folder of the container. 77 | 78 | ## How to build a Docker image with multi architecture support 79 | 80 | The above wso2am-acp:4.6.0-rocky image will only be supported for the CPU architecture of your current machine. Docker buildx plugin can be used to build wso2am-acp:4.6.0-rocky image to support any CPU architecture. 81 | 82 | #### 1. Install [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) 83 | 84 | #### 2. Install [QEMU Emulators](https://github.com/tonistiigi/binfmt) 85 | ``` 86 | docker run -it --rm --privileged tonistiigi/binfmt --install all 87 | ``` 88 | 89 | #### 3. Create, switch and inspect a new builder 90 | ``` 91 | docker buildx create --name wso2ambuilder 92 | ``` 93 | ``` 94 | docker buildx use wso2ambuilder 95 | ``` 96 | ``` 97 | docker buildx inspect --bootstrap 98 | ``` 99 | #### 4. Build and push 100 | 101 | ``` 102 | docker buildx build --platform linux/amd64,linux/arm64 -t /wso2am-acp:4.6.0-rocky --push . 103 | ``` 104 | 105 | > - Here is a valid Docker or Dockerhub username. 106 | > - Use command "docker login" to authenticate first if it fails to push. 107 | > - You can specify any number of platforms to support --platform flag 108 | > - Use command "docker buildx ls" to see list of existing builders and supported platforms. 109 | > - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only 110 | 111 | #### 5. Run 112 | ``` 113 | docker run -it -p 9443:9443 -p 8243:8243 /wso2am-acp:4.6.0-rocky 114 | ``` 115 | > Docker will pull the suitable image for the architecture and run 116 | 117 | > **Note** 118 | > If you are using Rancher to run the Docker image, you will not be able to use port 9443, which is already allocated by Rancher. As a workaround, you can follow the instructions given in [How to update configurations](#how-to-update-configurations) to run the APIM image in a different port. 119 | 120 | ## WSO2 Private Docker images 121 | 122 | If you have a valid WSO2 subscription you can have access to WSO2 private Docker images. These images will get updated frequently with bug fixes, security fixes and new improvements. To view available images visit [WSO2 Docker Repositories](https://docker.wso2.com/) 123 | 124 | ## Docker command usage references 125 | 126 | * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) 127 | * [Docker run command reference](https://docs.docker.com/engine/reference/run/) 128 | * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) 129 | * [Docker multi architecture build reference](https://docs.docker.com/desktop/multi-arch/) 130 | * [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) 131 | -------------------------------------------------------------------------------- /dockerfiles/ubuntu/apim-universal-gw/README.md: -------------------------------------------------------------------------------- 1 | # Dockerfile for WSO2 API Manager - Gateway # 2 | 3 | This section defines the step-by-step instructions to build an [Ubuntu](https://hub.docker.com/_/ubuntu/) Linux based Docker image for WSO2 API Manager - Gateway 4.6.0. 4 | 5 | ## Prerequisites 6 | 7 | * [Docker](https://www.docker.com/get-docker) v20.10.x or above 8 | * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client 9 | 10 | ## How to build an image and run 11 | 12 | #### 1. Checkout this repository into your local machine using the following Git client command. 13 | 14 | ``` 15 | git clone https://github.com/wso2/docker-apim.git 16 | ``` 17 | 18 | > The local copy of the `dockerfiles/ubuntu/apim-gw` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. 19 | 20 | #### 2. Build the Docker image. 21 | 22 | - Download wso2am-universal-gw-4.6.0.zip from [here](https://wso2.com/api-management/install/) 23 | - Host the product pack using a webserver. 24 | - Navigate to `` directory.
25 | - Execute `docker build` command as shown below. 26 | ``` 27 | docker build -t wso2am-universal-gw:4.6.0 . 28 | ``` 29 | 30 | > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. 31 | 32 | #### 3. Running the Docker image. 33 | 34 | ``` 35 | docker run -it -p 8243:8243 wso2am-universal-gw:4.6.0 36 | ``` 37 | 38 | > Here, port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. 39 | You may map other container service ports, which have been exposed to Docker host ports, as desired. 40 | 41 | #### 4. Accessing management console. 42 | 43 | - To access the management console, use the docker host IP and port 9443. 44 | + `https://:9443/carbon` 45 | 46 | > In here, refers to hostname or IP of the host machine on top of which containers are spawned. 47 | 48 | ## How to update configurations 49 | 50 | Configurations would lie on the Docker host machine and they can be volume mounted to the container.
51 | As an example, steps required to change the port offset using `deployment.toml` is as follows: 52 | 53 | #### 1. Stop the API Manager container if it's already running. 54 | 55 | In WSO2 API Manager version 4.6.0 product distribution, `deployment.toml` configuration file
56 | can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
57 | referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. 58 | 59 | #### 2. Grant read permission to `other` users for `/deployment.toml`. 60 | 61 | ``` 62 | chmod o+r /deployment.toml 63 | ``` 64 | 65 | #### 3. Run the image by mounting the file to container as follows: 66 | 67 | ``` 68 | docker run -it \ 69 | -p 9444:9444 \ 70 | -p 8244:8244 \ 71 | --volume /deployment.toml:/deployment.toml \ 72 | wso2am-universal-gw:4.6.0 73 | ``` 74 | 75 | > In here, refers to /home/wso2carbon/wso2am-universal-gw-4.6.0/repository/conf folder of the container. 76 | 77 | ## How to build a Docker image with multi architecture support 78 | 79 | The above wso2am-universal-gw:4.6.0 image will only be supported for the CPU architecture of your current machine. Docker buildx plugin can be used to build wso2am-universal-gw:4.6.0 image to support any CPU architecture. 80 | 81 | #### 1. Install [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) 82 | 83 | #### 2. Install [QEMU Emulators](https://github.com/tonistiigi/binfmt) 84 | ``` 85 | docker run -it --rm --privileged tonistiigi/binfmt --install all 86 | ``` 87 | 88 | #### 3. Create, switch and inspect a new builder 89 | ``` 90 | docker buildx create --name wso2ambuilder 91 | ``` 92 | ``` 93 | docker buildx use wso2ambuilder 94 | ``` 95 | ``` 96 | docker buildx inspect --bootstrap 97 | ``` 98 | #### 4. Build and push 99 | 100 | ``` 101 | docker buildx build --platform linux/amd64,linux/arm64 -t /wso2am-universal-gw:4.6.0 --push . 102 | ``` 103 | 104 | > - Here is a valid Docker or Dockerhub username. 105 | > - Use command "docker login" to authenticate first if it fails to push. 106 | > - You can specify any number of platforms to support --platform flag 107 | > - Use command "docker buildx ls" to see list of existing builders and supported platforms. 108 | > - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only 109 | 110 | #### 5. Run 111 | ``` 112 | docker run -it -p 9443:9443 -p 8243:8243 /wso2am-universal-gw:4.6.0 113 | ``` 114 | > Docker will pull the suitable image for the architecture and run 115 | 116 | > **Note** 117 | > If you are using Rancher to run the Docker image, you will not be able to use port 9443, which is already allocated by Rancher. As a workaround, you can follow the instructions given in [How to update configurations](#how-to-update-configurations) to run the APIM image in a different port. 118 | 119 | ## WSO2 Private Docker images 120 | 121 | If you have a valid WSO2 subscription you can have access to WSO2 private Docker images. These images will get updated frequently with bug fixes, security fixes and new improvements. To view available images visit [WSO2 Docker Repositories](https://docker.wso2.com/) 122 | 123 | ## Docker command usage references 124 | 125 | * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) 126 | * [Docker run command reference](https://docs.docker.com/engine/reference/run/) 127 | * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) 128 | * [Docker multi architecture build reference](https://docs.docker.com/desktop/multi-arch/) 129 | * [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) 130 | -------------------------------------------------------------------------------- /dockerfiles/rocky/apim-tm/README.md: -------------------------------------------------------------------------------- 1 | # Dockerfile for WSO2 API Manager - Traffice Manager # 2 | 3 | This section defines the step-by-step instructions to build an [Rocky Linux](https://hub.docker.com/_/rockylinux/) based Docker image for WSO2 API Manager - Traffic Manager 4.6.0. 4 | 5 | ## Prerequisites 6 | 7 | * [Docker](https://www.docker.com/get-docker) v20.10.x or above 8 | * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client 9 | 10 | 11 | ## How to build an image and run 12 | 13 | #### 1. Checkout this repository into your local machine using the following Git client command. 14 | 15 | ``` 16 | git clone https://github.com/wso2/docker-apim.git 17 | ``` 18 | 19 | > The local copy of the `dockerfiles/rocky/apim-tm` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. 20 | 21 | #### 2. Build the Docker image. 22 | 23 | - Download wso2am-tm-4.6.0.zip from [here](https://wso2.com/api-management/install/) 24 | - Host the product pack using a webserver. 25 | - Navigate to `` directory.
26 | - Execute `docker build` command as shown below. 27 | 28 | ``` 29 | docker build -t wso2am-tm:4.6.0-rocky . 30 | ``` 31 | 32 | > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. 33 | 34 | #### 3. Running the Docker image. 35 | 36 | ``` 37 | docker run -it -p 9443:9443 -p 9611:9611 -p 5672:5672 -p 9711:9711 wso2am-tm:4.6.0-rocky 38 | ``` 39 | 40 | > Here, only port 9443 (HTTPS servlet transport) and ports 9611, 5672, 9711 have been mapped to Docker host ports. 41 | You may map other container service ports, which have been exposed to Docker host ports, as desired. 42 | 43 | #### 4. Accessing management console. 44 | 45 | - To access the management console, use the docker host IP and port 9443. 46 | + `https://:9443/carbon` 47 | 48 | > In here, refers to hostname or IP of the host machine on top of which containers are spawned. 49 | 50 | ## How to update configurations 51 | 52 | Configurations would lie on the Docker host machine and they can be volume mounted to the container.
53 | As an example, steps required to change the port offset using `deployment.toml` is as follows: 54 | 55 | #### 1. Stop the API Manager container if it's already running. 56 | 57 | In WSO2 API Manager version 4.6.0 product distribution, `deployment.toml` configuration file
58 | can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
59 | referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. 60 | 61 | #### 2. Grant read permission to `other` users for `/deployment.toml`. 62 | 63 | ``` 64 | chmod o+r /deployment.toml 65 | ``` 66 | 67 | #### 3. Run the image by mounting the file to container as follows: 68 | 69 | ``` 70 | docker run -it \ 71 | -p 9444:9444 \ 72 | -p 8244:8244 \ 73 | --volume /deployment.toml:/deployment.toml \ 74 | wso2am-tm:4.6.0-rocky 75 | ``` 76 | 77 | > In here, refers to /home/wso2carbon/wso2am-tm-4.6.0/repository/conf folder of the container. 78 | 79 | ## How to build a Docker image with multi architecture support 80 | 81 | The above wso2am-tm:4.6.0-rocky image will only be supported for the CPU architecture of your current machine. Docker buildx plugin can be used to build wso2am-tm:4.6.0-rocky image to support any CPU architecture. 82 | 83 | #### 1. Install [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) 84 | 85 | #### 2. Install [QEMU Emulators](https://github.com/tonistiigi/binfmt) 86 | ``` 87 | docker run -it --rm --privileged tonistiigi/binfmt --install all 88 | ``` 89 | 90 | #### 3. Create, switch and inspect a new builder 91 | ``` 92 | docker buildx create --name wso2ambuilder 93 | ``` 94 | ``` 95 | docker buildx use wso2ambuilder 96 | ``` 97 | ``` 98 | docker buildx inspect --bootstrap 99 | ``` 100 | #### 4. Build and push 101 | 102 | ``` 103 | docker buildx build --platform linux/amd64,linux/arm64 -t /wso2am-tm:4.6.0-rocky --push . 104 | ``` 105 | 106 | > - Here is a valid Docker or Dockerhub username. 107 | > - Use command "docker login" to authenticate first if it fails to push. 108 | > - You can specify any number of platforms to support --platform flag 109 | > - Use command "docker buildx ls" to see list of existing builders and supported platforms. 110 | > - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only 111 | 112 | #### 5. Run 113 | ``` 114 | docker run -it -p 9443:9443 -p 8243:8243 /wso2am-tm:4.6.0-rocky 115 | ``` 116 | > Docker will pull the suitable image for the architecture and run 117 | 118 | > **Note** 119 | > If you are using Rancher to run the Docker image, you will not be able to use port 9443, which is already allocated by Rancher. As a workaround, you can follow the instructions given in [How to update configurations](#how-to-update-configurations) to run the APIM image in a different port. 120 | 121 | ## WSO2 Private Docker images 122 | 123 | If you have a valid WSO2 subscription you can have access to WSO2 private Docker images. These images will get updated frequently with bug fixes, security fixes and new improvements. To view available images visit [WSO2 Docker Repositories](https://docker.wso2.com/) 124 | 125 | ## Docker command usage references 126 | 127 | * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) 128 | * [Docker run command reference](https://docs.docker.com/engine/reference/run/) 129 | * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) 130 | * [Docker multi architecture build reference](https://docs.docker.com/desktop/multi-arch/) 131 | * [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) 132 | -------------------------------------------------------------------------------- /dockerfiles/rocky/apim-universal-gw/README.md: -------------------------------------------------------------------------------- 1 | # Dockerfile for WSO2 API Manager - Gateway# 2 | 3 | This section defines the step-by-step instructions to build an [Rocky Linux](https://hub.docker.com/_/rockylinux/) based Docker image for WSO2 API Manager - Gateway 4.6.0. 4 | 5 | ## Prerequisites 6 | 7 | * [Docker](https://www.docker.com/get-docker) v20.10.x or above 8 | * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client 9 | 10 | 11 | ## How to build an image and run 12 | 13 | #### 1. Checkout this repository into your local machine using the following Git client command. 14 | 15 | ``` 16 | git clone https://github.com/wso2/docker-apim.git 17 | ``` 18 | 19 | > The local copy of the `dockerfiles/rocky/apim-gw` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. 20 | 21 | #### 2. Build the Docker image. 22 | 23 | - Download wso2am-universal-gw-4.6.0.zip from [here](https://wso2.com/api-management/install/) 24 | - Host the product pack using a webserver. 25 | - Navigate to `` directory.
26 | - Execute `docker build` command as shown below. 27 | 28 | ``` 29 | docker build -t wso2am-universal-gw:4.6.0-rocky . 30 | ``` 31 | 32 | > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. 33 | 34 | #### 3. Running the Docker image. 35 | 36 | ``` 37 | docker run -it -p 8243:8243 wso2am-universal-gw:4.6.0-rocky 38 | ``` 39 | 40 | > Here, port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. 41 | You may map other container service ports, which have been exposed to Docker host ports, as desired. 42 | 43 | #### 4. Accessing management console. 44 | 45 | - To access the management console, use the docker host IP and port 9443. 46 | + `https://:9443/carbon` 47 | 48 | > In here, refers to hostname or IP of the host machine on top of which containers are spawned. 49 | 50 | ## How to update configurations 51 | 52 | Configurations would lie on the Docker host machine and they can be volume mounted to the container.
53 | As an example, steps required to change the port offset using `deployment.toml` is as follows: 54 | 55 | #### 1. Stop the API Manager container if it's already running. 56 | 57 | In WSO2 API Manager version 4.6.0 product distribution, `deployment.toml` configuration file
58 | can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
59 | referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. 60 | 61 | #### 2. Grant read permission to `other` users for `/deployment.toml`. 62 | 63 | ``` 64 | chmod o+r /deployment.toml 65 | ``` 66 | 67 | #### 3. Run the image by mounting the file to container as follows: 68 | 69 | ``` 70 | docker run -it \ 71 | -p 9444:9444 \ 72 | -p 8244:8244 \ 73 | --volume /deployment.toml:/deployment.toml \ 74 | wso2am-universal-gw:4.6.0-rocky 75 | ``` 76 | 77 | > In here, refers to /home/wso2carbon/wso2am-universal-gw-4.6.0/repository/conf folder of the container. 78 | 79 | ## How to build a Docker image with multi architecture support 80 | 81 | The above wso2am-universal-gw:4.6.0-rocky image will only be supported for the CPU architecture of your current machine. Docker buildx plugin can be used to build wso2am-universal-gw:4.6.0-rocky image to support any CPU architecture. 82 | 83 | #### 1. Install [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) 84 | 85 | #### 2. Install [QEMU Emulators](https://github.com/tonistiigi/binfmt) 86 | ``` 87 | docker run -it --rm --privileged tonistiigi/binfmt --install all 88 | ``` 89 | 90 | #### 3. Create, switch and inspect a new builder 91 | ``` 92 | docker buildx create --name wso2ambuilder 93 | ``` 94 | ``` 95 | docker buildx use wso2ambuilder 96 | ``` 97 | ``` 98 | docker buildx inspect --bootstrap 99 | ``` 100 | #### 4. Build and push 101 | 102 | ``` 103 | docker buildx build --platform linux/amd64,linux/arm64 -t /wso2am-universal-gw:4.6.0-rocky --push . 104 | ``` 105 | 106 | > - Here is a valid Docker or Dockerhub username. 107 | > - Use command "docker login" to authenticate first if it fails to push. 108 | > - You can specify any number of platforms to support --platform flag 109 | > - Use command "docker buildx ls" to see list of existing builders and supported platforms. 110 | > - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only 111 | 112 | #### 5. Run 113 | ``` 114 | docker run -it -p 9443:9443 -p 8243:8243 /wso2am-universal-gw:4.6.0-rocky 115 | ``` 116 | > Docker will pull the suitable image for the architecture and run 117 | 118 | > **Note** 119 | > If you are using Rancher to run the Docker image, you will not be able to use port 9443, which is already allocated by Rancher. As a workaround, you can follow the instructions given in [How to update configurations](#how-to-update-configurations) to run the APIM image in a different port. 120 | 121 | ## WSO2 Private Docker images 122 | 123 | If you have a valid WSO2 subscription you can have access to WSO2 private Docker images. These images will get updated frequently with bug fixes, security fixes and new improvements. To view available images visit [WSO2 Docker Repositories](https://docker.wso2.com/) 124 | 125 | ## Docker command usage references 126 | 127 | * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) 128 | * [Docker run command reference](https://docs.docker.com/engine/reference/run/) 129 | * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) 130 | * [Docker multi architecture build reference](https://docs.docker.com/desktop/multi-arch/) 131 | * [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) 132 | -------------------------------------------------------------------------------- /dockerfiles/rocky/apim-acp/Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # 17 | # ------------------------------------------------------------------------ 18 | 19 | # set base Docker image to Rocky Linux 20 | FROM rockylinux:9.3 21 | 22 | # Install necessary locale packages 23 | RUN yum clean all && \ 24 | yum makecache && \ 25 | yum -y update && \ 26 | yum install -y --nobest glibc-langpack-en langpacks-en glibc-locale-source && \ 27 | localedef -c -f UTF-8 -i en_US en_US.UTF-8 28 | 29 | ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' 30 | 31 | # install dependencies 32 | RUN yum install -y tzdata openssl ca-certificates fontconfig gzip tar nc unzip wget \ 33 | && yum clean all 34 | 35 | ENV JAVA_VERSION=jdk-21.0.5+11 36 | ENV JAVA_HOME=/opt/java/openjdk \ 37 | PATH="/opt/java/openjdk/bin:$PATH" 38 | 39 | # install Temurin OpenJDK 21 40 | RUN set -eux; \ 41 | ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ 42 | case "${ARCH}" in \ 43 | amd64|i386:x86-64) \ 44 | ESUM='810d3773df7e0d6c4394e4e244b264c8b30e0b05a0acf542d065fd78a6b65c2f'; \ 45 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.9%2B10/OpenJDK21U-jdk_x64_linux_hotspot_21.0.9_10.tar.gz'; \ 46 | ;; \ 47 | arm64|aarch64) \ 48 | ESUM='edf0da4debe7cf475dbe320d174d6eed81479eb363f41e38a2efb740428c603a'; \ 49 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.9%2B10/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.9_10.tar.gz'; \ 50 | ;; \ 51 | ppc64el) \ 52 | ESUM='ac5a0394a234269b4e20459649ac93cb702cde29b3e46a0bcf3aa53958f2d4a4'; \ 53 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.9%2B10/OpenJDK21U-jdk_ppc64le_linux_hotspot_21.0.9_10.tar.gz'; \ 54 | ;; \ 55 | *) \ 56 | echo "Unsupported arch: ${ARCH}"; \ 57 | exit 1; \ 58 | ;; \ 59 | esac; \ 60 | curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ 61 | echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ 62 | mkdir -p /opt/java/openjdk; \ 63 | cd /opt/java/openjdk; \ 64 | tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ 65 | rm -rf /tmp/openjdk.tar.gz; \ 66 | java -Xshare:dump; 67 | 68 | LABEL maintainer="WSO2 Docker Maintainers " \ 69 | com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.6.0.1" 70 | 71 | # set Docker image build arguments 72 | # build arguments for user/group configurations 73 | ARG USER=wso2carbon 74 | ARG USER_ID=10001 75 | ARG USER_GROUP=wso2 76 | ARG USER_GROUP_ID=10001 77 | ARG USER_HOME=/home/${USER} 78 | # build arguments for WSO2 product installation 79 | ARG WSO2_SERVER_NAME=wso2am-acp 80 | ARG WSO2_SERVER_VERSION=4.6.0 81 | ARG WSO2_SERVER_ZIP_VERSION=${WSO2_SERVER_VERSION} 82 | ARG WSO2_SERVER_REPOSITORY=product-apim 83 | ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} 84 | ARG WSO2_SERVER_ZIP=${WSO2_SERVER_NAME}-${WSO2_SERVER_ZIP_VERSION} 85 | ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} 86 | ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_ZIP_VERSION}/${WSO2_SERVER_ZIP}.zip 87 | # build argument for MOTD 88 | ARG MOTD='printf "\n\ 89 | Welcome to WSO2 Docker resources.\n\ 90 | ------------------------------------ \n\ 91 | This Docker container comprises of a WSO2 product, running with its latest GA release \n\ 92 | which is under the Apache License, Version 2.0. \n\ 93 | Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n\n"' 94 | 95 | # create the non-root user and group and set MOTD login message 96 | RUN \ 97 | groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \ 98 | && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} \ 99 | && echo ${MOTD} > /etc/profile.d/motd.sh 100 | 101 | # copy init script to user home 102 | COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ 103 | 104 | # add the WSO2 product distribution to user's home directory 105 | RUN \ 106 | wget -O ${WSO2_SERVER_ZIP}.zip "${WSO2_SERVER_DIST_URL}" \ 107 | && unzip -d ${USER_HOME} ${WSO2_SERVER_ZIP}.zip \ 108 | && EXTRACTED_DIR=$(ls -1 ${USER_HOME} | grep "^${WSO2_SERVER_NAME}-" | head -1) \ 109 | && if [ "${EXTRACTED_DIR}" != "${WSO2_SERVER}" ]; then mv ${USER_HOME}/${EXTRACTED_DIR} ${USER_HOME}/${WSO2_SERVER}; fi \ 110 | && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ 111 | && mkdir ${USER_HOME}/wso2-tmp \ 112 | && bash -c 'mkdir -p ${USER_HOME}/solr/{indexed-data,database}' \ 113 | && chown wso2carbon:wso2 -R ${USER_HOME}/solr \ 114 | && cp -r ${WSO2_SERVER_HOME}/repository/deployment/server/executionplans ${USER_HOME}/wso2-tmp \ 115 | && rm -f ${WSO2_SERVER_ZIP}.zip 116 | 117 | # remove unnecesary packages 118 | RUN yum remove -y unzip wget 119 | 120 | # set the user and work directory 121 | USER ${USER_ID} 122 | WORKDIR ${USER_HOME} 123 | 124 | # set environment variables 125 | ENV WORKING_DIRECTORY=${USER_HOME} \ 126 | WSO2_SERVER_HOME=${WSO2_SERVER_HOME} 127 | 128 | # expose ports 129 | EXPOSE 9611 9711 5672 9443 9763 130 | 131 | # initiate container and start WSO2 Carbon server 132 | ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] 133 | -------------------------------------------------------------------------------- /dockerfiles/rocky/apim-tm/Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # 17 | # ------------------------------------------------------------------------ 18 | 19 | # set base Docker image to Rocky Linux 20 | FROM rockylinux:9.3 21 | 22 | # Install necessary locale packages 23 | RUN yum clean all && \ 24 | yum makecache && \ 25 | yum -y update && \ 26 | yum install -y --nobest glibc-langpack-en langpacks-en glibc-locale-source && \ 27 | localedef -c -f UTF-8 -i en_US en_US.UTF-8 28 | 29 | ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' 30 | 31 | # install dependencies 32 | RUN yum install -y tzdata openssl ca-certificates fontconfig gzip tar nc unzip wget \ 33 | && yum clean all 34 | 35 | ENV JAVA_VERSION=jdk-21.0.5+11 36 | ENV JAVA_HOME=/opt/java/openjdk \ 37 | PATH="/opt/java/openjdk/bin:$PATH" 38 | 39 | # install Temurin OpenJDK 21 40 | RUN set -eux; \ 41 | ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ 42 | case "${ARCH}" in \ 43 | amd64|i386:x86-64) \ 44 | ESUM='810d3773df7e0d6c4394e4e244b264c8b30e0b05a0acf542d065fd78a6b65c2f'; \ 45 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.9%2B10/OpenJDK21U-jdk_x64_linux_hotspot_21.0.9_10.tar.gz'; \ 46 | ;; \ 47 | arm64|aarch64) \ 48 | ESUM='edf0da4debe7cf475dbe320d174d6eed81479eb363f41e38a2efb740428c603a'; \ 49 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.9%2B10/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.9_10.tar.gz'; \ 50 | ;; \ 51 | ppc64el) \ 52 | ESUM='ac5a0394a234269b4e20459649ac93cb702cde29b3e46a0bcf3aa53958f2d4a4'; \ 53 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.9%2B10/OpenJDK21U-jdk_ppc64le_linux_hotspot_21.0.9_10.tar.gz'; \ 54 | ;; \ 55 | *) \ 56 | echo "Unsupported arch: ${ARCH}"; \ 57 | exit 1; \ 58 | ;; \ 59 | esac; \ 60 | curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ 61 | echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ 62 | mkdir -p /opt/java/openjdk; \ 63 | cd /opt/java/openjdk; \ 64 | tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ 65 | rm -rf /tmp/openjdk.tar.gz; \ 66 | java -Xshare:dump; 67 | 68 | LABEL maintainer="WSO2 Docker Maintainers " \ 69 | com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.6.0.1" 70 | 71 | # set Docker image build arguments 72 | # build arguments for user/group configurations 73 | ARG USER=wso2carbon 74 | ARG USER_ID=10001 75 | ARG USER_GROUP=wso2 76 | ARG USER_GROUP_ID=10001 77 | ARG USER_HOME=/home/${USER} 78 | # build arguments for WSO2 product installation 79 | ARG WSO2_SERVER_NAME=wso2am-tm 80 | ARG WSO2_SERVER_VERSION=4.6.0 81 | ARG WSO2_SERVER_ZIP_VERSION=${WSO2_SERVER_VERSION} 82 | ARG WSO2_SERVER_REPOSITORY=product-apim 83 | ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} 84 | ARG WSO2_SERVER_ZIP=${WSO2_SERVER_NAME}-${WSO2_SERVER_ZIP_VERSION} 85 | ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} 86 | ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_ZIP_VERSION}/${WSO2_SERVER_ZIP}.zip 87 | # build argument for MOTD 88 | ARG MOTD='printf "\n\ 89 | Welcome to WSO2 Docker resources.\n\ 90 | ------------------------------------ \n\ 91 | This Docker container comprises of a WSO2 product, running with its latest GA release \n\ 92 | which is under the Apache License, Version 2.0. \n\ 93 | Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n\n"' 94 | 95 | # create the non-root user and group and set MOTD login message 96 | RUN \ 97 | groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \ 98 | && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} \ 99 | && echo ${MOTD} > /etc/profile.d/motd.sh 100 | 101 | # copy init script to user home 102 | COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ 103 | 104 | # add the WSO2 product distribution to user's home directory 105 | RUN \ 106 | wget -O ${WSO2_SERVER_ZIP}.zip "${WSO2_SERVER_DIST_URL}" \ 107 | && unzip -d ${USER_HOME} ${WSO2_SERVER_ZIP}.zip \ 108 | && EXTRACTED_DIR=$(ls -1 ${USER_HOME} | grep "^${WSO2_SERVER_NAME}-" | head -1) \ 109 | && if [ "${EXTRACTED_DIR}" != "${WSO2_SERVER}" ]; then mv ${USER_HOME}/${EXTRACTED_DIR} ${USER_HOME}/${WSO2_SERVER}; fi \ 110 | && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ 111 | && mkdir ${USER_HOME}/wso2-tmp \ 112 | && bash -c 'mkdir -p ${USER_HOME}/solr/{indexed-data,database}' \ 113 | && chown wso2carbon:wso2 -R ${USER_HOME}/solr \ 114 | && cp -r ${WSO2_SERVER_HOME}/repository/deployment/server/executionplans ${USER_HOME}/wso2-tmp \ 115 | && rm -f ${WSO2_SERVER_ZIP}.zip 116 | 117 | # remove unnecesary packages 118 | RUN yum remove -y unzip wget 119 | 120 | # set the user and work directory 121 | USER ${USER_ID} 122 | WORKDIR ${USER_HOME} 123 | 124 | # set environment variables 125 | ENV WORKING_DIRECTORY=${USER_HOME} \ 126 | WSO2_SERVER_HOME=${WSO2_SERVER_HOME} 127 | 128 | # expose ports 129 | EXPOSE 9611 9711 5672 9443 9763 130 | 131 | # initiate container and start WSO2 Carbon server 132 | ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] 133 | -------------------------------------------------------------------------------- /dockerfiles/rocky/apim-universal-gw/Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2025 WSO2, LLC. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # 17 | # ------------------------------------------------------------------------ 18 | 19 | # set base Docker image to Rocky Linux 20 | FROM rockylinux:9.3 21 | 22 | # Install necessary locale packages 23 | RUN yum clean all && \ 24 | yum makecache && \ 25 | yum -y update && \ 26 | yum install -y --nobest glibc-langpack-en langpacks-en glibc-locale-source && \ 27 | localedef -c -f UTF-8 -i en_US en_US.UTF-8 28 | 29 | ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' 30 | 31 | # install dependencies 32 | RUN yum install -y tzdata openssl ca-certificates fontconfig gzip tar nc unzip wget \ 33 | && yum clean all 34 | 35 | ENV JAVA_VERSION=jdk-21.0.5+11 36 | ENV JAVA_HOME=/opt/java/openjdk \ 37 | PATH="/opt/java/openjdk/bin:$PATH" 38 | 39 | # install Temurin OpenJDK 21 40 | RUN set -eux; \ 41 | ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ 42 | case "${ARCH}" in \ 43 | amd64|i386:x86-64) \ 44 | ESUM='810d3773df7e0d6c4394e4e244b264c8b30e0b05a0acf542d065fd78a6b65c2f'; \ 45 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.9%2B10/OpenJDK21U-jdk_x64_linux_hotspot_21.0.9_10.tar.gz'; \ 46 | ;; \ 47 | arm64|aarch64) \ 48 | ESUM='edf0da4debe7cf475dbe320d174d6eed81479eb363f41e38a2efb740428c603a'; \ 49 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.9%2B10/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.9_10.tar.gz'; \ 50 | ;; \ 51 | ppc64el) \ 52 | ESUM='ac5a0394a234269b4e20459649ac93cb702cde29b3e46a0bcf3aa53958f2d4a4'; \ 53 | BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.9%2B10/OpenJDK21U-jdk_ppc64le_linux_hotspot_21.0.9_10.tar.gz'; \ 54 | ;; \ 55 | *) \ 56 | echo "Unsupported arch: ${ARCH}"; \ 57 | exit 1; \ 58 | ;; \ 59 | esac; \ 60 | curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ 61 | echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ 62 | mkdir -p /opt/java/openjdk; \ 63 | cd /opt/java/openjdk; \ 64 | tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ 65 | rm -rf /tmp/openjdk.tar.gz; \ 66 | java -Xshare:dump; 67 | 68 | LABEL maintainer="WSO2 Docker Maintainers " \ 69 | com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.6.0.1" 70 | 71 | # set Docker image build arguments 72 | # build arguments for user/group configurations 73 | ARG USER=wso2carbon 74 | ARG USER_ID=10001 75 | ARG USER_GROUP=wso2 76 | ARG USER_GROUP_ID=10001 77 | ARG USER_HOME=/home/${USER} 78 | # build arguments for WSO2 product installation 79 | ARG WSO2_SERVER_NAME=wso2am-universal-gw 80 | ARG WSO2_SERVER_VERSION=4.6.0 81 | ARG WSO2_SERVER_ZIP_VERSION=${WSO2_SERVER_VERSION} 82 | ARG WSO2_SERVER_REPOSITORY=product-apim 83 | ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} 84 | ARG WSO2_SERVER_ZIP=${WSO2_SERVER_NAME}-${WSO2_SERVER_ZIP_VERSION} 85 | ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} 86 | ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_ZIP_VERSION}/${WSO2_SERVER_ZIP}.zip 87 | # build argument for MOTD 88 | ARG MOTD='printf "\n\ 89 | Welcome to WSO2 Docker resources.\n\ 90 | ------------------------------------ \n\ 91 | This Docker container comprises of a WSO2 product, running with its latest GA release \n\ 92 | which is under the Apache License, Version 2.0. \n\ 93 | Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n\n"' 94 | 95 | # create the non-root user and group and set MOTD login message 96 | RUN \ 97 | groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \ 98 | && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} \ 99 | && echo ${MOTD} > /etc/profile.d/motd.sh 100 | 101 | # copy init script to user home 102 | COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ 103 | 104 | # add the WSO2 product distribution to user's home directory 105 | RUN \ 106 | wget -O ${WSO2_SERVER_ZIP}.zip "${WSO2_SERVER_DIST_URL}" \ 107 | && unzip -d ${USER_HOME} ${WSO2_SERVER_ZIP}.zip \ 108 | && EXTRACTED_DIR=$(ls -1 ${USER_HOME} | grep "^${WSO2_SERVER_NAME}-" | head -1) \ 109 | && if [ "${EXTRACTED_DIR}" != "${WSO2_SERVER}" ]; then mv ${USER_HOME}/${EXTRACTED_DIR} ${USER_HOME}/${WSO2_SERVER}; fi \ 110 | && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ 111 | && mkdir ${USER_HOME}/wso2-tmp \ 112 | && bash -c 'mkdir -p ${USER_HOME}/solr/{indexed-data,database}' \ 113 | && chown wso2carbon:wso2 -R ${USER_HOME}/solr \ 114 | && cp -r ${WSO2_SERVER_HOME}/repository/deployment/server/synapse-configs ${USER_HOME}/wso2-tmp \ 115 | && rm -f ${WSO2_SERVER_ZIP}.zip 116 | 117 | # remove unnecesary packages 118 | RUN yum remove -y unzip wget 119 | 120 | # set the user and work directory 121 | USER ${USER_ID} 122 | WORKDIR ${USER_HOME} 123 | 124 | # set environment variables 125 | ENV WORKING_DIRECTORY=${USER_HOME} \ 126 | WSO2_SERVER_HOME=${WSO2_SERVER_HOME} 127 | 128 | # expose ports 129 | EXPOSE 8280 8243 9763 9443 9099 8099 9021 8021 130 | 131 | # initiate container and start WSO2 Carbon server 132 | ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] 133 | -------------------------------------------------------------------------------- /dockerfiles/jdk17/ubuntu/apim/README.md: -------------------------------------------------------------------------------- 1 | # Dockerfile for WSO2 API Manager # 2 | 3 | This section defines the step-by-step instructions to build an [Ubuntu](https://hub.docker.com/_/ubuntu/) Linux based Docker image for WSO2 API Manager 4.6.0. 4 | 5 | ## Prerequisites 6 | 7 | * [Docker](https://www.docker.com/get-docker) v20.10.x or above 8 | * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client 9 | 10 | ## How to build an image and run 11 | 12 | #### 1. Checkout this repository into your local machine using the following Git client command. 13 | 14 | ``` 15 | git clone https://github.com/wso2/docker-apim.git 16 | ``` 17 | 18 | > The local copy of the `dockerfiles/ubuntu/apim` directory will be referred to as `AM_DOCKERFILE_HOME` from this point onwards. 19 | 20 | #### 2. Build the Docker image. 21 | 22 | - Download wso2am-4.6.0.zip from [here](https://wso2.com/api-management/install/) 23 | - Host the product pack using a webserver. 24 | - Navigate to `` directory.
25 | - Execute `docker build` command as shown below. 26 | ``` 27 | docker build -t wso2am:4.6.0-jdk17 . 28 | ``` 29 | 30 | > By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. 31 | 32 | #### 3. Running the Docker image. 33 | 34 | ``` 35 | docker run -it -p 9443:9443 -p 8243:8243 wso2am:4.6.0-jdk17 36 | ``` 37 | 38 | > Here, only port 9443 (HTTPS servlet transport) and port 8243 (Passthrough or NIO HTTPS transport) have been mapped to Docker host ports. 39 | You may map other container service ports, which have been exposed to Docker host ports, as desired. 40 | 41 | #### 4. Accessing management console. 42 | 43 | - To access the management console, use the docker host IP and port 9443. 44 | + `https://:9443/carbon` 45 | 46 | > In here, refers to hostname or IP of the host machine on top of which containers are spawned. 47 | 48 | ## How to update configurations 49 | 50 | Configurations would lie on the Docker host machine and they can be volume mounted to the container.
51 | As an example, steps required to change the port offset using `deployment.toml` is as follows: 52 | 53 | #### 1. Stop the API Manager container if it's already running. 54 | 55 | In WSO2 API Manager version 4.6.0 product distribution, `deployment.toml` configuration file
56 | can be found at `/repository/conf`. Copy the file to some suitable location of the host machine,
57 | referred to as `/deployment.toml` and change the offset value (`[server]->offset`) to 1. 58 | 59 | #### 2. Grant read permission to `other` users for `/deployment.toml`. 60 | 61 | ``` 62 | chmod o+r /deployment.toml 63 | ``` 64 | 65 | #### 3. Run the image by mounting the file to container as follows: 66 | 67 | ``` 68 | docker run \ 69 | -p 9444:9444 \ 70 | -p 8244:8244 \ 71 | --volume /deployment.toml:/deployment.toml \ 72 | wso2am:4.6.0-jdk17 73 | ``` 74 | 75 | > In here, refers to /home/wso2carbon/wso2am-4.6.0/repository/conf folder of the container. 76 | 77 | ## How to build a Docker image with multi architecture support 78 | 79 | The above wso2am:4.6.0-jdk17 image will only be supported for the CPU architecture of your current machine. Docker buildx plugin can be used to build wso2am:4.6.0-jdk17 image to support any CPU architecture. 80 | 81 | #### 1. Install [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) 82 | 83 | #### 2. Install [QEMU Emulators](https://github.com/tonistiigi/binfmt) 84 | ``` 85 | docker run -it --rm --privileged tonistiigi/binfmt --install all 86 | ``` 87 | 88 | #### 3. Create, switch and inspect a new builder 89 | ``` 90 | docker buildx create --name wso2ambuilder 91 | ``` 92 | ``` 93 | docker buildx use wso2ambuilder 94 | ``` 95 | ``` 96 | docker buildx inspect --bootstrap 97 | ``` 98 | #### 4. Build and push 99 | 100 | ``` 101 | docker buildx build --platform linux/amd64,linux/arm64 -t /wso2am:4.6.0-jdk17 --push . 102 | ``` 103 | 104 | > - Here is a valid Docker or Dockerhub username. 105 | > - Use command "docker login" to authenticate first if it fails to push. 106 | > - You can specify any number of platforms to support --platform flag 107 | > - Use command "docker buildx ls" to see list of existing builders and supported platforms. 108 | > - Please note we have only tested this for linux/amd64 and linux/arm64 platforms only 109 | 110 | #### 5. Run 111 | ``` 112 | docker run -it -p 9443:9443 -p 8243:8243 /wso2am:4.6.0-jdk17 113 | ``` 114 | > Docker will pull the suitable image for the architecture and run 115 | 116 | > **Note** 117 | > If you are using Rancher to run the Docker image, you will not be able to use port 9443, which is already allocated by Rancher. As a workaround, you can follow the instructions given in [How to update configurations](#how-to-update-configurations) to run the APIM image in a different port. 118 | 119 | ## Running official wso2am images 120 | It is possible to use official wso2am images without building them from the scratch. 121 | 122 | - To run on amd64 123 | ``` 124 | docker run -it -p 9443:9443 -p 8243:8243 wso2/wso2am:4.6.0-jdk17 125 | ``` 126 | 127 | - To run on native Apple Silicon ( arm64 ) 128 | ``` 129 | docker run -it -p 9443:9443 -p 8243:8243 wso2/wso2am:4.6.0-jdk17 130 | ``` 131 | 132 | 133 | ## WSO2 Private Docker images 134 | 135 | If you have a valid WSO2 subscription you can have access to WSO2 private Docker images. These images will get updated frequently with bug fixes, security fixes and new improvements. To view available images visit [WSO2 Docker Repositories](https://docker.wso2.com/) 136 | 137 | ## Docker command usage references 138 | 139 | * [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) 140 | * [Docker run command reference](https://docs.docker.com/engine/reference/run/) 141 | * [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) 142 | * [Docker multi architecture build reference](https://docs.docker.com/desktop/multi-arch/) 143 | * [Docker buildx reference](https://docs.docker.com/buildx/working-with-buildx/) 144 | -------------------------------------------------------------------------------- /dockerfiles/jdk17/rocky/apim/Dockerfile: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # 3 | # Copyright 2018 WSO2, Inc. (http://wso2.com) 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License 16 | # 17 | # ------------------------------------------------------------------------ 18 | 19 | # set base Docker image to Rocky Linux 20 | FROM rockylinux:9.3 21 | 22 | # Install necessary locale packages 23 | RUN yum clean all && \ 24 | yum makecache && \ 25 | yum -y update && \ 26 | yum install -y --nobest glibc-langpack-en langpacks-en glibc-locale-source && \ 27 | localedef -c -f UTF-8 -i en_US en_US.UTF-8 28 | 29 | ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' 30 | 31 | # install dependencies 32 | RUN yum install -y tzdata openssl ca-certificates fontconfig gzip tar nc unzip wget \ 33 | && yum clean all 34 | 35 | ENV JAVA_VERSION jdk-17.0.11+9 36 | 37 | # install Temurin OpenJDK 17 38 | RUN set -eux; \ 39 | ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ 40 | case "${ARCH}" in \ 41 | aarch64|arm64) \ 42 | ESUM='a900acf3ae56b000afc35468a083b6d6fd695abec87a8abdb02743d5c72f6d6d'; \ 43 | BINARY_URL='https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_aarch64_linux_hotspot_17.0.11_9.tar.gz'; \ 44 | ;; \ 45 | ppc64el|powerpc:common64) \ 46 | ESUM='44bdd662c3b832cfe0b808362866b8d7a700dd60e6e39716dee97211d35c230f'; \ 47 | BINARY_URL='https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.11_9.tar.gz'; \ 48 | ;; \ 49 | amd64|i386:x86-64) \ 50 | ESUM='aa7fb6bb342319d227a838af5c363bfa1b4a670c209372f9e6585bd79da6220c'; \ 51 | BINARY_URL='https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_x64_linux_hotspot_17.0.11_9.tar.gz'; \ 52 | ;; \ 53 | *) \ 54 | echo "Unsupported arch: ${ARCH}"; \ 55 | exit 1; \ 56 | ;; \ 57 | esac; \ 58 | curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ 59 | echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ 60 | mkdir -p /opt/java/openjdk; \ 61 | cd /opt/java/openjdk; \ 62 | tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ 63 | rm -rf /tmp/openjdk.tar.gz; 64 | 65 | ENV JAVA_HOME=/opt/java/openjdk \ 66 | PATH="/opt/java/openjdk/bin:$PATH" 67 | 68 | LABEL maintainer="WSO2 Docker Maintainers " \ 69 | com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v4.6.0.1" 70 | 71 | # set Docker image build arguments 72 | # build arguments for user/group configurations 73 | ARG USER=wso2carbon 74 | ARG USER_ID=10001 75 | ARG USER_GROUP=wso2 76 | ARG USER_GROUP_ID=10001 77 | ARG USER_HOME=/home/${USER} 78 | # build arguments for WSO2 product installation 79 | ARG WSO2_SERVER_NAME=wso2am 80 | ARG WSO2_SERVER_VERSION=4.6.0 81 | ARG WSO2_SERVER_ZIP_VERSION=${WSO2_SERVER_VERSION} 82 | ARG WSO2_SERVER_REPOSITORY=product-apim 83 | ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} 84 | ARG WSO2_SERVER_ZIP=${WSO2_SERVER_NAME}-${WSO2_SERVER_ZIP_VERSION} 85 | ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} 86 | ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/releases/download/v${WSO2_SERVER_ZIP_VERSION}/${WSO2_SERVER_ZIP}.zip 87 | # build argument for MOTD 88 | ARG MOTD='printf "\n\ 89 | Welcome to WSO2 Docker resources.\n\ 90 | ------------------------------------ \n\ 91 | This Docker container comprises of a WSO2 product, running with its latest GA release \n\ 92 | which is under the Apache License, Version 2.0. \n\ 93 | Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n\n"' 94 | 95 | # create the non-root user and group and set MOTD login message 96 | RUN \ 97 | groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \ 98 | && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} \ 99 | && echo ${MOTD} > /etc/profile.d/motd.sh 100 | 101 | # copy init script to user home 102 | COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ 103 | 104 | # add the WSO2 product distribution to user's home directory 105 | RUN \ 106 | wget -O ${WSO2_SERVER_ZIP}.zip "${WSO2_SERVER_DIST_URL}" \ 107 | && unzip -d ${USER_HOME} ${WSO2_SERVER_ZIP}.zip \ 108 | && EXTRACTED_DIR=$(ls -1 ${USER_HOME} | grep "^${WSO2_SERVER_NAME}-" | head -1) \ 109 | && if [ "${EXTRACTED_DIR}" != "${WSO2_SERVER}" ]; then mv ${USER_HOME}/${EXTRACTED_DIR} ${USER_HOME}/${WSO2_SERVER}; fi \ 110 | && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ 111 | && mkdir ${USER_HOME}/wso2-tmp \ 112 | && bash -c 'mkdir -p ${USER_HOME}/solr/{indexed-data,database}' \ 113 | && chown wso2carbon:wso2 -R ${USER_HOME}/solr \ 114 | && cp -r ${WSO2_SERVER_HOME}/repository/deployment/server/synapse-configs ${USER_HOME}/wso2-tmp \ 115 | && cp -r ${WSO2_SERVER_HOME}/repository/deployment/server/executionplans ${USER_HOME}/wso2-tmp \ 116 | && rm -f ${WSO2_SERVER_ZIP}.zip 117 | 118 | # remove unnecesary packages 119 | RUN yum remove -y unzip wget 120 | 121 | # set the user and work directory 122 | USER ${USER_ID} 123 | WORKDIR ${USER_HOME} 124 | 125 | # set environment variables 126 | ENV WORKING_DIRECTORY=${USER_HOME} \ 127 | WSO2_SERVER_HOME=${WSO2_SERVER_HOME} 128 | 129 | # expose ports 130 | EXPOSE 9763 9443 9999 11111 8280 8243 5672 9711 9611 9099 131 | 132 | # initiate container and start WSO2 Carbon server 133 | ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] 134 | --------------------------------------------------------------------------------