You can run WebSphere® Application Server in a container by
building your own container image with WebSphere Application Server binary
files or by extending a pre-packaged IBM® container
image.
To run WebSphere Application Server in a container, choose one of the
following two methods.
Procedure
- Build your own container image by using WebSphere Application Server binary files and the instructions from GitHub.
- Extend one of the IBM pre-packaged container images.
The IBM prepackaged container images for WebSphere Application Server are in IBM Cloud
Container Registry (ICR), which is the public container registry for IBM Cloud®. These images
contain an International License Agreement for Non-Warranted Programs (ILAN) license. This license
allows entitled WebSphere Application Server customers to use these images
under an International Program License Agreement (IPLA) term.
- Select from the preconfigured container image tags.
- Set up a Dockerfile template for your application image.
The following example Dockerfile template specifies a container image with the 8.5.5.23 version
of WebSphere Application Server in the FROM directive
.
FROM icr.io/appcafe/websphere-traditional:8.5.5.23
COPY --chown=was:root was-config.props /work/config/
COPY --chown=was:root myApp.war /work/app/
COPY --chown=was:root myAppDeploy.py dataSourceConfig.py /work/config/
RUN /work/configure.sh
- To create an image that uses WebSphere Application Server version 8.5.5,
you must specify a release version number in the FROM directive.
- A template like this one creates an image that adds a single application and the corresponding
configuration.
- Do not configure the container manually after it is started, except for debugging purposes,
because these changes are not reflected in new containers that are created from the image.
Results
You now have a container image that contains both your application and its configuration, which
means you can create new, fully configured containers at any time.