Skip to content
Example of WAS + Docker.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app-code
app-ear
app-image
base-was-image
jenkins
.gitignore
Jenkinsfile
README.md
pom.xml

README.md

WAS + Docker Example

Overview

Example of a multi-module WAS + Docker project.

Required software:

  • Java
  • Maven
  • Docker

Clone this repository and run the following commands to build the demo:

mvn clean install
docker run -d --rm --name was-test -h was-test -p 9043:9043 -p 9443:9443 jrmcdonald/app-image:latest

In your browser access https://localhost:9043/hello.

To access the WAS console:

Docker exec was-test cat /tmp/PASSWORD

In your browser access https://localhost:9443/ibm/console and use the username wsadmin and the password from above.

Container Labels

The container images use the Open Containers Initiative Annotations Specification to provide a consistent labelling format. Note that there is a current issue where text passed as build-args to through the dockerfile plugin gets the spaces escaped into + characters (https://github.com/spotify/dockerfile-maven/issues/136).

GitFlow

This project uses the Git-Flow Maven Plugin to facilitate creating/merging feature/release/hotfix branches.

Jenkins

This project is built automatically via Jenkins using the supplied Jenkinsfile. Jenkins uses the kubernetes plugin to create new pods for specific jenkins agents and runs the jobs on those. Whan a tagged commit is pushed, Jenkins deploys the built images to the docker hub registry.

The customised jenkins images are built from https://github.com/jrmcdonald/jenkins.qwyck.net and the kubernetes configuration for jenkins is at https://github.com/jrmcdonald/kubernetes.qwyck.net/blob/master/jenkins.yaml.

Kubernetes Secrets

The following secrets are required for this to be built/deployed by Jenkins:

You can’t perform that action at this time.