DEV Community

loading...

Getting Started with WSO2 API Manager Locally Using Docker

dendihandian profile image Dendi Handian Updated on ・2 min read

This post is obviously the guide to get started wso2 api manager using docker. This is not recommended option, people who actually uses this product might be preferred to use the standalone installation rather than using docker because it is easier to manage deployment configuration file rather than learning the devops in docker.

I got a task to research this product, but I will not tell you what this product is here in detail. So the official site should tell you better. But what I will be doing here is how to get it started on our machine. Because WSO2 API Manager using Java Runtime and I kind of don't want to install it on my machine (and I'm not a Java Developer either), so I will use Docker instead to run this.

Make sure the memory allocated for the docker instance is at least 2GB free

Pulling the Image

The recent stable version I got is 3.2.0, so I will use it instead of using the latest tag version just to keep it constant in my machine. Here is the pull command:

docker pull wso2/wso2am:3.2.0
Enter fullscreen mode Exit fullscreen mode

the image size is quite big:

C:\Users\dendi>docker image ls
REPOSITORY                                      TAG             IMAGE ID       CREATED        SIZE
...
wso2/wso2am                                     3.2.0           fbbec18d601c   4 months ago   1.03GB
...
Enter fullscreen mode Exit fullscreen mode

Running the Image as a Container

Interactive Running

As stated in the docker image page, you can directly run the image as a container using this command:

docker run -it -p 8280:8280 -p 8243:8243 -p 9443:9443 --name api-manager wso2/wso2am:3.2.0
Enter fullscreen mode Exit fullscreen mode

But it will leave you with interactive logs open and the container will be stopped when you kill it. Running this way can be useful if the image is actually not working and causing an error for the first try, you will see the detail in the log.

When the container was killed and you want to rerun it, you can restart the container this way:

docker container restart api-manager
Enter fullscreen mode Exit fullscreen mode

Background Running

The only difference is on the run flag. The interactive one uses -it flag, but the background running one uses -d flag:

docker run -d -p 8280:8280 -p 8243:8243 -p 9443:9443 --name api-manager wso2/wso2am:3.2.0
Enter fullscreen mode Exit fullscreen mode

You can always check the container logs by:

docker container logs api-manager
Enter fullscreen mode Exit fullscreen mode

Using the Product

There are 4 management consoles or user interfaces you can access:

You can log-in to each system by using admin as username and password. Have fun exploring them.

Discussion (0)

Forem Open with the Forem app