IBM DataPower Gateway for Docker
The IBM DataPower Gateway for Docker combines the power of DataPower with the flexibility of Docker. This image contains an unconfigured DataPower Gateway with the default username
admin and password
admin. You add configuration through
docker build or by attaching volumes.
IBM DataPower Gateways is a market leading extensible gateway platform for developers & enterprises. It helps you quickly secure, control, connect and accelerate the delivery of APIs, applications and data across digital business channels in the cloud and on premise to enable digital innovation and transformation.
This image is made available free of charge without IBM support for developer usage. IBM offers other licenses with support for this image, contact IBM for details.
||The latest stable version|
||The latest stable version of the major release|
||A specific stable version|
||The latest beta version|
||A specific beta version|
IBM DataPower Gateways Product Documentation describes in detail how to use IBM DataPower Gateways.
This image requires a minimum of 4GB RAM and 2 CPUs.
To use the image, you must accept the license terms. If you do not assert that you have accepted the license, DataPower will prevent most tasks.
You can view the license with the
/bin/drouter --show-license arg or by specifying
docker run -e DATAPOWER_SHOW_LICENSE=true ibmcom/datapower docker run ibmcom/datapower /bin/drouter --show-license
You can assert license acceptance by specifying the environment variable
DATAPOWER_ACCEPT_LICENSE=true or with the
/bin/drouter --accept-license arg when you run the image.
docker run -e DATAPOWER_ACCEPT_LICENSE=true ibmcom/datapower docker run ibmcom/datapower /bin/drouter --accept-license
Other Startup Options
The primary DataPower Gateway process is
drouter. You can convert
drouter arguments to environment variables for the
docker run command, or enter them at the CLI.
Usage: drouter [options] [config file] Options: -l, --log-level <num> : Sets the default log level. -n, --log-stdout : Directs the default log output to stdout. -m, --log-color : Enables color on the default log when it is directed to stdout. -i, --interactive : Prompts for login to the DataPower CLI on stdin. -t, --worker-threads <num> : Sets the number of worker threads for the main DataPower process. -V, --version : Shows the DataPower version and exits. --version-xml : Shows the DataPower version in XML and exits. --system-info : Shows the DataPower version in XML format and exits. --accept-license : Asserts that the product license has already been accepted. --show-license : Displays the product license in English. Use '--no-' prefix to negate boolean options. Example: --no-log-stdout Environment variables: Use capitalized long names prefixed by DATAPOWER_ and with '-' characters replaced with '_'. Example: DATAPOWER_LOG_COLOR=true The command line options take precedence over environment variables.
DATAPOWER_LOG_COLOR=true environment variables are set in this image.
We recommend that you always set
DATAPOWER_WORKER_THREADS=x to a value less than the number of CPUs on your system. Otherwise, the DataPower Gateway will default to one worker thread for each CPU.
local:/// directories are in the image as
/drouter/local. The best practice for adding configuration is to attach volumes or
COPY your DataPower configuration into those directories at
docker build time.
An example of using DataPower configuration in Docker Volumes:
docker run -v /path/to/my/config:/drouter/config -v /path/to/my/local:/drouter/local ibmcom/datapower
If you don't already have configuration, you can enable
web-mgmt, map port 9090, and import or create a new configuration. When you
write mem or Save Configuration, the resulting files will be written to the volumes.
Putting it all together
One common way a Developer might run DataPower is:
docker run -it \ -v $PWD/config:/drouter/config \ -v $PWD/local:/drouter/local \ -e DATAPOWER_ACCEPT_LICENSE=true \ -e DATAPOWER_INTERACTIVE=true \ -e DATAPOWER_WORKER_THREADS=4 \ -p 9090:9090 \ ibmcom/datapower
The Docker volumes allow the developer to read and save configuration from and to files that are under version control.
DATAPOWER_INTERACTIVE=true combined with the
docker run -it args allow the developer to log in directly to the DataPower CLI. Docker's
--tty args must be used for DataPower's interactive mode to work.
By limiting the number of DataPower worker threads to 4, the developer ensures that his 8-core machine is optimized for running other containers along with a reasonably capable DataPower container.
Mapping port 9090 allows access to the DataPower web-mgmt interface on its default port.
For help with the IBM DataPower Gateway for Docker, you can join the DeveloperWorks communities. Both DeveloperWorks Answers and the DeveloperWorks DataPower Forum are vibrant communities. You'll find everyone from beginners to industry experts to development team members there. We welcome you to join us!
Links to Resources
- IBM DataPower Gateways Developer Center
- IBM DataPower Gateways
- IBM DataPower Gateways Product Documentation
- DeveloperWorks Answers
- DeveloperWorks DataPower Forum
View the license directly in the image at
/LICENSE.txt or with the command
docker run ibmcom/datapower /bin/drouter --show-license. The license can also be viewed from the
web-mgmt interface using a browser.
"Development" means that the Program can only be deployed as part of Licensee's internal development and unit testing environments. Licensee is not authorized to use the Program for testing, quality assurance activity, testing scalability of any code, application or system, internal benchmarking, staging, production workloads, or simulating production workloads. Licensee is not authorized to use any part of the Program for any other purposes without acquiring the appropriate non-production or production entitlements.
Is there any way to import my all existing service using dockerfile.
Please help me with this.
It looks like PacketCapture does not work in the latest version. Get the error message: "Packet capture failed to store at temporary: ///capture.pcap. Failed to set up packet recording."
Thank you in advance for the feedback.
Wow,DP Containerized! Up and Running on MAC.
Just had to enable web-mgmt.and
Adjusted memory setting in Docker.
I was installed DataPower in Docker and Successfully getting UI. my host is 192.168.99.101.
In DataPower I created the one sample service(Multiprotocal gate way)and ny font side handler port is 1417.
when I was make call regarding to that service it does shoes any Response code/Response.
Please help me to resolve this issue.
Does datapower require being root ? Can I set USER in Dockerfile and be non-root ?
@tffrench , thank you! I guess the docker build option is the one I should use for what I am trying to do -- I am trying to use shipyard to spin-up instances and was ideally trying to avoid requiring end-users from logging into the CLI to "attach". I was hoping there was an option to "attach" to the running container purely via the web-ui provided by shipyard. As an alternative, committing some basic changes to the existing image would work for now since the basic thing we were trying to do by logging into the console is to bring up the web-gui(which as you suggested can be baked into a custom base image). I will post any new questions to the forums, thank you!
Detailed below are two simple ways. You can also leverage docker build to bake-in basic configurations, like enabling the SSH or WebGUI management interfaces.
Please use one of the two forums listed under “Links to Resources” for future correspondence, Thanks!
Simplest would be to add
-it and attach:
docker run --name datapower -d -it -e DATAPOWER_ACCEPT_LICENSE=true -e DATAPOWER_INTERACTIVE=true ibmcom/datapower docker attach datapower
Documentation on attach: https://docs.docker.com/engine/reference/commandline/attach
Can can also enable SSH using the stdio CLI, persist the configuration and then connect using the ssh client directly:
docker run --rm -it -v $PWD/config:/drouter/config -v $PWD/local:/drouter/local -e DATAPOWER_ACCEPT_LICENSE=true -e DATAPOWER_INTERACTIVE=true ibmcom/datapower idg# con Global configuration mode idg(config)# ssh SSH service listener enabled idg(config)# write Overwrite previously saved configuration? Yes/No [y/n]: y idg(config)# exit; exit; CTRL-C docker run --name datapower -d -v $PWD/config:/drouter/config -v $PWD/local:/drouter/local -e DATAPOWER_ACCEPT_LICENSE=true -p 9022:22 ibmcom/datapower ssh localhost -p 9022
Thank you for the image! Is there a way to run this as a daemon, and then ssh into the console later.
docker exec'ing into /bin/drouter is throwing some weird errors that dont show up if we use
docker run -it. What should we run via docker exec to land on the console. Disabling stdout doesn't seem to have any impact, the login prompt doesn't show up....
Wow! It doesn't get any easier than this. I had not used Docker in the past. So, I had to start from scratch. Installing Docker on my mac was something that I had planned to do. It was straight forward. Then, with a single command the DataPower image was installed and brought up. If you wanted a DataPower platform to carry with you and to use on your laptop, your wishes have been granted!