• Stars
    star
    172
  • Rank 221,201 (Top 5 %)
  • Language
    HTML
  • License
    Apache License 2.0
  • Created almost 9 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dockerfiles for WebSphere Application Server traditional

Docker Hub Image

The files in this directory are used to build the ibmcom/websphere-traditional images on Docker Hub. These images contain the ILAN licensed IBM WebSphere Application Server traditional. For production use or if you wish to build these yourself just follow these instructions, otherwise please see below on how to extend our pre-built image with your application and configuration! Once you're ready to deploy this into Kubernetes, please see our helm chart.

Try IBM Container Registry: Our traditional WebSphere Application Server images are also available from IBM Container Registry (ICR) at icr.io/appcafe/websphere-traditional. Unlike with Docker Hub, images can be pulled from ICR without rate limits and without authentication. Only images with Universal Base Image (UBI) as the Operating System are available in ICR at the moment.

Note: The 9.0.5.3 release images were the last version where latest and 9.0.5.# tagged images were based upon Ubuntu v16.04 as the base operating system. Starting with the 9.0.5.4 release, the images are now based upon Red Hat Universal Base Image (UBI) 8 OS images. As always, you are welcome to build your own images using any base OS image that supports IBM WebSphere Application traditional.

Note: Have you considered trying out WebSphere Liberty? It's based on the Open Source project Open Liberty, fully supports Java EE8 and MicroProfile 2.0, and it's much lighter, faster and easier to configure than WAS traditional. You can try it today for free from Docker Hub. If you have entitlement for WAS traditional you already have entitlement for Liberty included. Find out more about how to use WebSphere Liberty in Kubernetes here.

Building an application image

The Docker Hub image contains a traditional WebSphere Application Server v9 or v855 instance with no applications or configuration applied to it.

Best practices

According to Docker's best practices you should create a new image (FROM ibmcom/websphere-traditional) which adds a single application and the corresponding configuration. You should avoid configuring the image manually (after it started) via Admin Console or wsadmin (unless it is for debugging purposes) because such changes won't be present if you spawn a new container from the image.

Even if you docker save the manually configured container, the steps to reproduce the image from ibmcom/websphere-traditional will be lost and you will hinder your ability to update that image.

The key point to take-away from the sections below is that your application Dockerfile should always follow a pattern similar to:

FROM ibmcom/websphere-traditional:<version>
# copy property files and jython scripts, using the flag `--chown=was:root` to set the appropriate permission
RUN /work/configure.sh

This will result in a Docker image that has your application and configuration pre-loaded, which means you can spawn new fully-configured containers at any time.

App Image

Adding properties during build phase

The Docker Hub images contain a script, /work/applyConfig.sh, which will apply the config properties found inside the /work/config/*.props file. This script will be run with the server in stopped mode and the prop files will be applied in alphabetic order.

For example, if you had the following /work/config/001-was-config.props:

ResourceType=JavaVirtualMachine
ImplementingResourceType=Server
ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:JavaProcessDef=:JavaVirtualMachine=
AttributeInfo=jvmEntries
#
#
#Properties
#
initialHeapSize=2048 #integer,default(0)

You can then create a new image which has this configuration by simply building the following Dockerfile:

FROM ibmcom/websphere-traditional:latest
COPY --chown=was:root 001-was-config.props /work/config/
RUN /work/configure.sh

You may use numeric prefixes on your prop file names, so props that have dependencies can be applied in an adequate order.

Adding an application and advanced configuration during build phase

Similar to the example above, you can also deploy an application and advanced configuration by placing your Jython (.py) scripts under the folder /work/config.

Putting it all together, you would have a Dockerfile such as:

FROM ibmcom/websphere-traditional:latest
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

Installing iFixes

Normally it is best to use fixpacks instead of installing individual iFixes but some circumstances may require the ability to install a test fix. In order to install iFixes on the image, you must first get access to the agent installer and the Fix Central for the required download:

    1. Follow the instructions at https://www.ibm.com/support/pages/node/1115169 until you have downloaded the agent.installer.linux.gtk*.zip file to your system. For example, the installer zip for a linux x86_64 will be similar to agent.installer.linux.gtk.x86_64_1.9.2003.20220917_1018.zip.
    1. Follow the Fix Central https://www.ibm.com/support/fixcentral/ to select the ifix matched to your product version and platform. For example, an ifix PH47531 for the platform of linux x86_64 will be similar to 9.0.0.0-ws-wasprod-ifph47531.zip

Once you have the iFix and the agent installer on the system you are building your image on, configure the dockerfile to extract the installer and run the installer on the iFix as shown in the example dockerfile below.

FROM ibmcom/websphere-traditional:9.0.0.10
COPY A.ear /work/config/A.ear
COPY install_app.py /work/config/install_app.py
RUN /work/configure.sh

COPY agent.installer.linux.gtk*.zip /work
RUN cd /work && \
	unzip agent.installer.linux.gtk*.zip -d /work/InstallationManagerKit && \
	rm -rf agent.installer.linux.gtk*.zip  

COPY **YOUR_DOWNLADED_IFIX.zip** /work/
	RUN /work/InstallationManagerKit/tools/imcl install **THE_IFIX_FIX_NAME** -repositories /work/**YOUR_DOWNLADED_IFIX.zip** -installationDirectory /opt/IBM/WebSphere/AppServer -dataLocation /opt/IBM/WebSphere/AppServerIMData && \
	rm -Rf /tmp/secureStorePwd /tmp/secureStore /work/InstallationManagerKit

NOTE:

  • Replace the value YOUR_DOWNLADED_IFIX.zip with your downloaded ifix
  • Replace the value THE_IFIX_FIX_NAME with the selected ifix name. If you're not sure about the ifix fix name, you may unzip the ifix zip and retrieve the fix name from the file fix_name.txt. Please be aware there may be case sensitivity between fix name and the zip file name. See the example from linux ifix on the replaced values:
COPY 9.0.0.0-ws-wasprod-ifph47531.zip /work
RUN /work/InstallationManagerKit/tools/imcl install 9.0.0.0-WS-WASProd-IFPH47531 -repositories /work/9.0.0.0-ws-wasprod-ifph47531.zip …

You can find more information about the imcl command at https://www.ibm.com/support/knowledgecenter/en/SSDV2W_1.8.4/com.ibm.cic.commandline.doc/topics/c_imcl_container.html

Logging configuration

By default, the Docker Hub image is using High Performance Extensible Logging (HPEL) mode and is outputing logs in JSON format. This logging configuration will make the docker container a lot easier to work with ELK stacks.

Alternatively, user can use basic logging mode is plain text format. You can switch the logging mode to basic via the following Dockerfile:

FROM ibmcom/websphere-traditional:latest
ENV ENABLE_BASIC_LOGGING=true
RUN /work/configure.sh

Running Jython scripts individually

If you have some Jython scripts that must be run in a certain order, or if they require parameters to be passed in, then you can directly call the /work/configure.sh script - once for each script.

Let's say you have 2 scripts, configA.py and configB.py, which must be run in that order. You can configure them via the following Dockerfile:

FROM ibmcom/websphere-traditional:latest
COPY --chown=was:root configA.py configB.py /work/
RUN /work/configure.sh /work/configA.py <args> \
    && /work/configure.sh /work/configB.py <args>

Runtime configuration

How about properties that are dynamic and depend on the environment (eg: changing JAAS passwords or data source host at runtime)? Traditional WAS is not nearly as dynamic as Liberty, but we have augmented the start_server script to look into /etc/websphere for any property files that need to applied to the server.

So during docker run you can setup a volume that mounts property files into /etc/websphere, such as:

docker run -v /config:/etc/websphere  -p 9043:9043 -p 9443:9443 websphere-traditional:latest

Similarly to build-phase props, the dynamic runtime props will also be applied in alphabetic order, so you can also use numeric prefixes to guarantee dependent props are applied in an adequate order.

Dynamic

How to run this image

When the container is started by using the IBM WebSphere Application Server traditional image, it takes the following environment variables:

  • UPDATE_HOSTNAME (optional, set to true if the hostname should be updated from the default of localhost)
  • PROFILE_NAME (optional, default is AppSrv01)
  • NODE_NAME (optional, default is DefaultNode01)
  • SERVER_NAME (optional, default is server1)

Running the image by using the default values

   docker run --name was-server -h was-server -p 9043:9043 -p 9443:9443 -d \
   websphere-traditional:latest

Running the image by passing values for the environment variables

docker run --name <container-name> -h <container-name> \
  -e UPDATE_HOSTNAME=true -e PROFILE_NAME=<profile-name> \
  -e NODE_NAME=<node-name> -e SERVER_NAME=<server-name> \
  -p 9043:9043 -p 9443:9443 -d <profile-image-name>

Example:

docker run --name test -h test -e UPDATE_HOSTNAME=true \
  -e PROFILE_NAME=AppSrv02 -e NODE_NAME=DefaultNode02 -e SERVER_NAME=server2 \
  -p 9043:9043 -p 9443:9443 -d websphere-traditional:latest 

Retrieving the password

The admin console user id is defaulted to wsadmin and the initial wsadmin user password is in /tmp/PASSWORD

   docker exec was-server cat /tmp/PASSWORD

Retrieving the keystore password

The initial keystore, truststore, and rootstore password is in /tmp/KEYSTORE_PASSWORD

   docker exec was-server cat /tmp/KEYSTORE_PASSWORD

How to check the WebSphere Application Server installed level and ifixes

   docker run websphere-traditional:9.0.5.0 versionInfo.sh -ifixes

Checking the logs

docker logs -f --tail=all <container-name>

Example:

docker logs -f --tail=all test

The logs from this container are also available inside /logs, therefore you can setup a volume mount to persist these logs into an external directory:

Logs

Stopping the Application Server gracefully

docker stop --time=<timeout> <container-name>

Example:

docker stop --time=60 test

Checking the Image Version

Using podman (or docker) you can check the date the image was created using the following command.

podman images websphere-traditional

You can then check the output for the creation date

REPOSITORY                              TAG         IMAGE ID      CREATED     SIZE
docker.io/ibmcom/websphere-traditional  latest      f5dd9da02c85  7 days ago  1.91 GB

If you would like to check the version of websphere running inside of your image, you can run the following command against the image. Replace "websphere-traditional" with your image name if you want to check an image you built.

podman run --entrypoint="./opt/IBM/WebSphere/AppServer/bin/versionInfo.sh" websphere-traditional

Updating to the Latest Version

  1. Find the currently running containers using the websphere-traditional image. Take note of their container ID
podman ps -a
  1. Stop and remove the running websphere-traditional containers. Both of these commands will output the container ID when completed
podman stop <container_id_from_step_1>
podman rm <container_id_from_step_1>
  1. Pull the updated image. The tag should be for the version you are using
podman pull ibmcom/websphere-traditional:latest
  1. Rebuild images that use the websphere-traditional image. Make sure they are using the same "FROM" that you pulled in step 3
  2. Run the newly pulled and built container images

More Repositories

1

ci.docker

Build scripts for Docker images (Dockerfiles) and Docker related utilities for WebSphere Liberty.
Shell
124
star
2

sample.voice.gateway

Lots of helpful samples to help jumpstart development with the IBM Voice Gateway.
JavaScript
62
star
3

sample.daytrader7

The DayTrader 7 benchmark sample, which is a Java EE 7 application built around the paradigm of an online stock trading system. #JavaEE7
Java
40
star
4

ci.docker.tutorials

Hands-on tutorials walking through using Websphere Application Server with Docker.
Dockerfile
26
star
5

standards.jsr352.jbatch

Home of 'jbatch', a compatible implementation of the Jakarta Batch specification (and the former Reference Implementation for the JSR 352, Batch Applications for the Java Platform specification).
Java
21
star
6

ci.docker.ibm-http-server

Dockerfiles for IBM HTTP Server
Shell
17
star
7

lib.rtcomm.clientjs

Rtcomm client Javascript libraries (includes WebRTC support)
JavaScript
15
star
8

lib.angular-rtcomm

The Rtcomm Angular module, which exposes a set of real-time communication features in the form of a service and a number of Angular directives and controllers.
JavaScript
14
star
9

ci.maven.tools

A collection of Maven archetypes and target POMs for developing Java EE and OSGi applications targeting WebSphere Liberty within the WDT Eclipse IDE.
Java
13
star
10

sample.rtcomm.mobile

A mobile sample application using lib.rtcomm.clientjs
JavaScript
12
star
11

tool.lars

The Liberty Asset Repository Service implements a repository for Liberty features that you can deploy locally
Java
12
star
12

sample.daytrader3

The DayTrader 3 benchmark sample, which is a Java EE 6 application built around the paradigm of an online stock trading system.
Java
10
star
13

tool.accelerate.core

No further updates will be made to this repository
Java
10
star
14

standards.jsr352.batch-spec

Home of the Java Batch standard (JSR 352, Batch Applications for the Java Platform) and its ongoing evolution. #JavaEE7
Shell
10
star
15

sample.plantsbywebsphere

Updated Plants By WebSphere showcase sample to run on WebSphere Liberty.
Java
9
star
16

websphere-liberty-operator

Deploy and manage containerized Liberty applications on Kubernetes. Documentation: https://ibm.biz/wlo-docs
Go
9
star
17

sample.logstash.collector

A sample project containing a Logstash configuration file, the index template, and the sample Kibana dashboard for exploiting the logstashCollector-1.0 feature in Liberty.
9
star
18

sample.DefaultApplication

This repo describes the modernization process for the tradtional WebSphere DefaultApplication.
HTML
8
star
19

sample.ejb

A sample that demonstrates injection of an EJB into a servlet and provides an application consisting of a servlet and stateless session bean.
Java
8
star
20

sample.opentracing.zipkintracer

Zipkin Opentracing tracer implementation for use with Liberty
Java
7
star
21

sample.pmi.prometheus.grafana

This repository contains a Docker compose file to quickly set up WebSphere Application Server traditional Performance Monitoring Infrastructure (PMI) metrics with Prometheus and Grafana.
Python
7
star
22

util.bash.completion

Bash auto completion scripts for Liberty profile server
6
star
23

sample.javaee7.jms

A couple of servlets use simplified API of JMS2.0 for performing Point to Point and Publish/Subscribe messaging. #JavaEE7
Java
6
star
24

sample.netflixoss.wlp

Sample to demonstrate using WebSphere Liberty Profile with Netflix OSS
Java
6
star
25

sample.jms.server

Liberty JMS server sample
Java
5
star
26

sample.javaee7.websocket

Sample Java EE 7 WebSocket application (available pre-deployed to WAS classic V9 beta hosted in bluemix.net) #JavaEE7
Java
5
star
27

sample.docker.mq

Sample for demonstrating using Docker Compose to configure a topology with WebSphere Liberty and IBM MQ
Java
5
star
28

sample.ejb2

EJB 2 remote example on WebSphere Liberty/Open Liberty with EJB JAR, EJB Client JAR, WAR, EAR and App Client.
Java
4
star
29

sample.javaee7.servlet.nonblocking

Demonstrates how to use non-blocking I/O by using new APIs added to ServletInputStream and ServletOutputStream. #JavaEE7
Java
4
star
30

sample.batch.bonuspayout

Demos the batch-1.0 and batchManagement-1.0 features of WebSphere Liberty. It uses the batchManager command-line utility to wrapper the REST-based remote dispatch and management interface. #JavaEE7
Java
4
star
31

websphere-liberty-s2i

Shell
4
star
32

sample.SpringBootMVC

Sample project demonstrating how to integrate a Basic Spring Boot MVC application with Liberty using Maven.
Shell
4
star
33

sample.jaxws.web

Java
3
star
34

azure.liberty.aro

Shell
3
star
35

sample.javaee7.jsonp

5 servlets that will parse and display JSON data using different implementations for getting the JSON code. #JavaEE7
Java
3
star
36

sample.jpa

A sample that contains a server definition which contains a very simple JPA application consisting of a single servlet and a JPA servlet.
Java
3
star
37

lib.batch.magicsauce

Provides two key capabilities to batch application developers adopting IBM's Java Batch platforms built on WebSphere Application Server. #JavaEE7
Java
3
star
38

sample.SpringBootWebsocket

Sample project demonstrating how to integrate a Spring Boot WebSocket application with Liberty using Maven.
Java
3
star
39

sample.wola

Samples showing the use of WebSphere Optimized Local Adaptors
3
star
40

sample.consulservicediscovery

A sample user feature which hooks Liberty annotation scanning to automatically discover and register all REST services with a Consul agent.
Java
3
star
41

sample.docker.db2

Samples for deploying a web application that talks to a DB2 database, using Docker-Compose across multiple Docker machines.
Shell
3
star
42

sample.Spring

Sample to demonstrate Spring and Spring MVC integration through a simple phonebook sample Web application deployed to Liberty.
Java
3
star
43

sample.javaee7.concurrency

Demonstrates how to use managed executors, managed scheduled executors, and context service to perform tasks in parallel in a simple application.
Java
3
star
44

sample.BYOJackson

Sample application and blog post describing how to package Jackson with your Liberty application.
Java
2
star
45

sample.microservicebuilder.helm.elk

Sample Helm chart for using ELK with Microservice Builder
2
star
46

azure.liberty.aks

Bicep
2
star
47

sample.oauth.store

Sample implementations of the WebSphere Liberty com.ibm.websphere.security.oauth20.store.OAuthStore API using a BELL and a user feature.
Java
2
star
48

sample.javaee7.el30

Shows how to use some of the new EL 3.0 (Expression Language) functions. #JavaEE7
Java
2
star
49

sample.servlet.jdbc

Basic servlet sample with a simple JDBC datasource definition. #JavaEE7
Java
2
star
50

sample.microprofile.meetingapp

An e-meeting redirection sample application written using MicroProfile and Liberty.
Java
2
star
51

ci.maven.parent

Stores parent poms used by builds in other repositories.
2
star
52

sample.logstash.websphere-traditional

Sample configuration files for ELK and filebeat for traditional WAS
2
star
53

azure.websphere-traditional.cluster

Bicep
2
star
54

sample.batch.sleepybatchlet

A simple sample batchlet for use with feature batch-1.0 on WebSphere Liberty. #JavaEE7
Java
2
star
55

sample.rxjava

Sample containing a WebSockets endpoint that uses the RxJava APIs.
Java
2
star
56

sample.rtcomm.healthcare

Demonstrates using the WASdev/lib.rtcomm.clientjs and WASdev/lib.angular-rtcomm projects to add real-time communications to a Healthcare website.
HTML
2
star
57

sample.dashboards

Sample dashboards for Liberty for logging and monitoring.
2
star
58

sample.docker.datacenter

Samples for deploying collectives, static topologies, and NGINX/Interlock topologies with Liberty on Docker Datacenter (Docker Swarm).
Shell
1
star
59

sample.angular-rtcomm

Demos some of the features of the angular-rtcomm framework.
JavaScript
1
star
60

azure.websphere-traditional.singleserver

Shell
1
star
61

azure.websphere-traditional.image

Shell
1
star
62

sample.abdera.jaxrs

Demonstrating JAXRS-2.0 integration with Apache Abdera. #JavaEE7
Java
1
star
63

lib.rtcomm.node-red

Rtcomm Node-RED nodes
JavaScript
1
star
64

sample.microservices.docs

1
star
65

standards.jsr352.tck

Home of the TCK for the Java Batch standard (JSR 352, Batch Applications for the Java Platform). #JavaEE7
Java
1
star
66

sample.metrics

A simple sample of how to add metrics to your Liberty apps and visualize them in Grafana.
Java
1
star
67

sample.rtcomm.sip.gateway

Sample application that uses JSR 289 and JSR 309 to connect a SIP soft phone and an Rtcomm WebRTC endpoint using a media server as a mediator and translator for the media.
Java
1
star
68

sample.async.jaxrs

This is a collection of samples that illustrate the async capabilities of JAX-RS 2.0 in Java EE7 that can be used to make your applications more responsive. #JavaEE7
Java
1
star
69

sample.wsadmin.websphere-traditional

Python
1
star
70

sample.rtcomm.helpdesk

This is a sample WebRTC helpdesk application that demonstrates how WebSphere can be used to build an application that supports the creation of real-time audio/video/chat sessions between a customer and an agent.
JavaScript
1
star