Overview
You can run DataPower (https://www-03.ibm.com/software/products/fi/datapower-gateway) in Docker on your own computer to do integration development and test the features of DataPower.
If you are using a VPN connection, it might cause an issue so the best bet is to disconnect it while installing or using Docker.
Instructions
If you don't already have Hyper-V feature enabled, you'll get the following message. Click OK. You need to have virtualization enabled on the mother board also.
In the system tray you'll see the Docker whale icon. Right click it and select 'Settings'.
In setting you'll need to share at least one drive.
Set allocated memory to be at least 4096 MB. Apply changes.
Open cmd or Powershell and type 'docker version' to see Docker is in the path and you are ready to continue.
Pull the
DataPower image with the command "docker pull ibmcom/datapower".
Enter you username/password.
In cmd type command:
docker run -it -v $PWD/config:/drouter/config -v $PWD/local:/drouter/local -e DATAPOWER_ACCEPT_LICENSE=true -e DATAPOWER_INTERACTIVE=true -p 9090:9090 --name mydockerdp ibmcom/datapower
If you need to access xml management interface on the DataPower (when using Apache Ant for example) you'll want to use the following command instead:
docker run -it -v $PWD/config:/drouter/config -v $PWD/local:/drouter/local -e DATAPOWER_ACCEPT_LICENSE=true -e DATAPOWER_INTERACTIVE=true -p 9090:9090 -p 5550:5550 --name mydockerdp ibmcom/datapower
If you need to be elevated do use an absolute path (in this example also many ports are mapped):
docker run -it -v C:/Docker/idg01/config:/drouter/config -v C:/Docker/idg01/local:/drouter/local -e DATAPOWER_ACCEPT_LICENSE=true -e DATAPOWER_INTERACTIVE=true -p 9090:9090 -p 5550:5550 -p 8080:8080 -p 8081:8081 -p 8082:8082 -p 8083:8083 -p 8084:8084 -p 8085:8085 --name idg01 ibmcom/datapower
"C:/Docker/idg01/config:/drouter/config -v C:/Docker/idg01/local:/drouter/local" means that DataPower configuration and files under local -directory are stored in the C:\Docker directory on your computer to maintain the state of DataPower when Docker/DataPower is not running.
"-p 9090:9090" for example means that on your computer you can call localhost:9090 and it's redirected to the Datatapower port 9090
On the lower right corner of the desktop you might get a message:
Docker for Windows - Share drive
Docker wants to access drive….
Do you want to share it?
Click "Share it".
Use 'admin' as username and 'admin' as password to log in to DataPower.
Next
you'll need to configure web management to be able to connect with a browser.
The
commands:
co
web-mgmt
0 9090 9000
After
entering the commands you'll might need to push enter to get back to the
prompt.
Save the
configuration change with "write mem". You'll need to push enter to
get back to the prompt.
In the browser go to the address 'https://127.0.0.1:9090".
In the Edge browser click 'Detail' and then 'Go on to the webpage (Not recommended)'
Use admin/admin to log in.
Some useful commands for Docker
Show containers: docker ps -a
Stop
container: docker stop mydockerdp
Start
container: docker start mydockerdp
that was really helpful for me !! thank you
ReplyDeleteThanks for the detailed explanation
ReplyDelete