wso2/wso2am

By wso2

Updated 4 months ago

WSO2 API Manager

Image
72

1M+

About WSO2 Product Docker Images

WSO2 product Docker images available at DockerHub package General Availability (GA) versions of WSO2 products with no WSO2 Updates.

For a production grade deployment of the desired WSO2 product-version, it is highly recommended to use the relevant Docker image which packages WSO2 Updates, available at WSO2 Private Docker Registry.

Supported tags and respective Dockerfile links

Quick reference

About WSO2 API Manager

WSO2 API Manager is an open source approach that addresses full API lifecycle management, monetization, and policy enforcement. It allows extensibility and customization, and ensures freedom from lock-in.

As part of the larger WSO2 Integration Agile Platform, it is a central component used to deploy and manage API-driven ecosystems. Its hybrid integration capabilities further simplify projects that span traditional as well as microservice environments. And unlike other API and lifecycle management products, it is fully open-source allowing for extensibility and customization.

logo

How to use this image.

Start an API Manager instance

The following command starts a Linux Ubuntu-based API Manager Docker image.

$ docker run -it -p 8280:8280 -p 8243:8243 -p 9443:9443 --name api-manager wso2/wso2am:4.0.0

Here, only ports 8280, 8243 and 9443 have been mapped to the corresponding Docker host (host machine on top of which containers are spawned) ports. You may map other container service ports to Docker host ports as desired.

Accessing management console

  • To access the Carbon Management Console, use the Docker host IP and port 9443 as follows:
https://{DOCKER_HOST}:9443/carbon
  • To access the API Manager Publisher, use the Docker host IP and port 9443 as follows:
https://{DOCKER_HOST}:9443/publisher
  • To access the API Manager Developer Portal, use the Docker host IP and port 9443 as follows:
https://{DOCKER_HOST}:9443/devportal

Container shell access and viewing server logs

Assuming you have started a Docker container instance of API Manager as instructed in the previous section Start an API Manager instance,

  • The API Manager log is available through Docker's container log:
$ docker logs api-manager
  • The Docker exec command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside the container you created:
$ docker exec -it api-manager bash

Pass arguments during server startup

Running in debug mode

To start a Docker container instance of the API Manager in debug mode (assuming 5005 to be the remote debugging port), use the following command:

$ docker run -it -p 8280:8280 -p 8243:8243 -p 9443:9443 -p 5005:5005 --name another-api-manager wso2/wso2am:4.0.0 -debug *:5005
JMX port monitoring

WSO2 Carbon platform uses TCP ports to monitor a running Carbon instance using a JMX client such as JConsole. JMX is enabled in WSO2 products by default. Thus, JMX server is started automatically in a particular product.

The default JMX ports RMIRegistryPort and the RMIServerPort are started on ports 9999 and 11111 respectively.

Hence, assuming the default ports are not changed, start a Docker container instance of API Manager using the following command.

$ docker run -it -p 8280:8280 -p 8243:8243 -p 9443:9443 -p 9999:9999 -p 11111:11111 --name jmx-apim wso2/wso2am:4.0.0

Obtain the JMX Service URL as described in the WSO2 official documentation from the server startup log.

List server logs:

docker logs jmx-apim

Server log line to capture:

INFO - JMXServerManager JMX Service URL : service:jmx:rmi://localhost:11111/jndi/rmi://localhost:9999/jmxrmi

Follow the steps provided under Monitoring a WSO2 product with JConsole.

Please see the WSO2 official documentation for advanced details on JMX monitoring.

Note: Passing arguments during server startup is not supported in Docker image with tag 2.5.0.

How to update configurations

Configurations would lie on the Docker host machine and they can be volume mounted to the container. As an example, the steps required to change the port offset using deployment.toml is as follows:

  • Stop the API Manager container if it's already running.

In the API Manager product distribution, deployment.toml configuration file can be found at {DISTRIBUTION_HOME}/repository/conf.

Copy the file to a suitable location of the host machine, referred to as {SOURCE_CONFIGS}/deployment.toml and change the offset value ([server]->offset) to 1.

  • Grant read permission to other users for {SOURCE_CONFIGS}/deployment.toml.
$ chmod o+r {SOURCE_CONFIGS}/deployment.toml
  • Run the image by mounting the file to the container as follows:
$ docker run -p 9444:9444 --volume {SOURCE_CONFIGS}/deployment.toml:{TARGET_CONFIGS}/deployment.toml wso2/wso2am:4.0.0

Here, {TARGET_CONFIGS} refers to /home/wso2carbon/wso2am-4.0.0/repository/conf folder of the container.

Image Variants

Multiple product profile Docker images based on different base operating systems are available.

wso2am:{version}

Ubuntu 20.04 LTS is used as the base Docker image. Temurin OpenJDK 11 is installed on top of this image.

WSO2 API Manager has been installed on top of this.

wso2am:{version}-alpine

Alpine 3.15 is used as the base Docker image. Temurin OpenJDK 11 is installed on top of this image.

WSO2 API Manager has been installed on top of this.

wso2am:{version}-centos

CentOS 7 is used as the base Docker image. Temurin OpenJDK 11 is installed on top of this image

WSO2 API Manager has been installed on top of this.

wso2am:{version}-multiarch

This image supports both amd64 and arm64 architecture. It is recommended to use this image for testing purposes only.

Ubuntu 20.04 is used as the base Docker image. Temurin OpenJDK 11 is installed on top of this image based on the base architecture type.

WSO2 API Manager has been installed on top of this.

License

View license information for the software contained in this image.

As with all Docker images, these are likely to contain other software which may be under other licenses (such as Bash, etc. from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

Docker Pull Command

docker pull wso2/wso2am