Public Repository

Last pushed: 3 days ago
Short Description
IBM DataPower Gateway
Full Description

IBM DataPower Gateway for Docker

Overview

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.

Supported Tags

Tag Purpose
latest The latest stable version
<three-digit-version> The latest stable version of the major release
<four-digit-version>.<build> A specific stable version
beta The latest beta version
beta-<four-digit-version>.<build> A specific beta version

Usage

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.

License Acceptance

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 DATAPOWER_SHOW_LICENSE=true

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.

The DATAPOWER_LOG_STDOUT=true and DATAPOWER_LOG_COLOR=true environment variables are set in this image.

We recommend that you always set --worker-threads or 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.

Adding Configuration

The DataPower config:/// and local:/// directories are in the image as /drouter/config and /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 --interactive and --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.

Community Engagement

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

License

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.

Docker Pull Command
Owner
ibmcom

Comments (9)
saurabhsinha
a month ago

Hello All,
Is there any way to import my all existing service using dockerfile.
Please help me with this.
Thanks

s3n29t
a month ago

Hello Team
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.

Best Regards
Peter

rsarunprashad
6 months ago

Wow,DP Containerized! Up and Running on MAC.
Just had to enable web-mgmt.and
Adjusted memory setting in Docker.

3537
7 months ago

Hello Team,
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.
Thank You

jcates
a year ago

Does datapower require being root ? Can I set USER in Dockerfile and be non-root ?

thiyag
a year ago

@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!

tffrench
a year ago

@thiyag, Yes!

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 -d with -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
thiyag
a year ago

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....

tjsmith
a year ago

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!