### Configure WebSphere Liberty Dockerfile with Local Feature Repository
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This Dockerfile example shows how to use the FEATURE_REPO_URL build argument to point to a locally hosted feature repository. It also includes the necessary RUN configure.sh command for applying the features.
```dockerfile
FROM icr.io/appcafe/websphere-liberty:kernel-java17-openj9-ubi
ARG FEATURE_REPO_URL=http://wlprepos:8080/19.0.0.x/repo.zip
ARG VERBOSE=false
RUN configure.sh
```
--------------------------------
### Enable OpenIdConnect Client Snippet
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This snippet enables the OpenIdConnect Client function by adding the `openidConnectClient-1.0` feature to the Liberty server configuration.
```XML
openidConnectClient-1.0
```
--------------------------------
### Configure Infinispan Session Caching in Dockerfile
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This Dockerfile snippet demonstrates how to set up IBM Liberty for session caching with Infinispan. It installs Infinispan client JARs, copies them to the Liberty shared resources, and configures the `INFINISPAN_SERVICE_NAME` environment variable. Optional environment variables for host, port, user, and password are also shown for scenarios where Liberty and Infinispan are in different namespaces.
```Dockerfile
### Infinispan Session Caching ###
FROM icr.io/appcafe/websphere-liberty:kernel-java17-openj9-ubi AS infinispan-client
# Install Infinispan client jars
USER root
RUN infinispan-client-setup.sh
USER 1001
FROM icr.io/appcafe/websphere-liberty:kernel-java17-openj9-ubi AS open-liberty-infinispan
# Copy Infinispan client jars to Open Liberty shared resources
COPY --chown=1001:0 --from=infinispan-client /opt/ibm/wlp/usr/shared/resources/infinispan /opt/ibm/wlp/usr/shared/resources/infinispan
# Instruct configure.sh to use Infinispan for session caching.
# This should be set to the Infinispan service name.
# TIP - Run the following oc/kubectl command with admin permissions to determine this value:
# oc get infinispan -o jsonpath={.items[0].metadata.name}
ENV INFINISPAN_SERVICE_NAME=example-infinispan
# Uncomment and set to override auto detected values.
# These are normally not needed if running in a Kubernetes environment.
# One such scenario would be when the Infinispan and Liberty deployments are in different namespaces/projects.
#ENV INFINISPAN_HOST=
#ENV INFINISPAN_PORT=
#ENV INFINISPAN_USER=
#ENV INFINISPAN_PASS=
# This script will add the requested XML snippets and grow image to be fit-for-purpose
RUN configure.sh
```
--------------------------------
### Build Docker Image using Dockerfile
Source: https://github.com/wasdev/ci.docker/blob/main/beta/README.md
This snippet shows how to build the WebSphere Liberty Beta Docker image using the provided Dockerfile. It requires Docker to be installed.
```Shell
docker build .
```
--------------------------------
### Build Docker Image with Local Feature Repository URL
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This command demonstrates how to build a Docker image, passing the FEATURE_REPO_URL as a build argument. This allows the WebSphere Liberty build process to use the specified local feature repository.
```bash
docker build --build-arg FEATURE_REPO_URL="http://wlprepos:8080/19.0.0.x/repo.zip"
```
--------------------------------
### Add curl to Docker Image for Feature Repository Configuration
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This Dockerfile snippet illustrates how to install the 'curl' package within a Debian-based (Ubuntu) image before running configure.sh. This is necessary for Docker images that do not include curl by default, which is a requirement for fetching features from a repository.
```dockerfile
FROM icr.io/appcafe/websphere-liberty:kernel-java17-openj9-ubi
USER root
RUN apt-get update && apt-get install -y curl
USER 1001
ARG FEATURE_REPO_URL=http://wlprepos:8080/19.0.0.x/repo.zip
ARG VERBOSE=false
RUN configure.sh
```
--------------------------------
### Configure MicroProfile Metrics Snippet
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This snippet configures the monitoring of server runtime environment and application metrics using Liberty features `mpMetrics-1.1` and `monitor-1.0`. The `/metrics` endpoint is configured without authentication.
```XML
mpMetrics-1.1
monitor-1.0
```
--------------------------------
### Configure OpenIdConnect Client from Environment Variables Snippet
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This snippet enables the OpenIdConnect Client configuration to be read from environment variables, specifically OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, and OIDC_DISCOVERY_URL. This simplifies configuration management.
```XML
```
--------------------------------
### Dockerfile: Build WebSphere Liberty Application Image
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This Dockerfile demonstrates the recommended practice for building a WebSphere Application Server Liberty image. It includes steps for copying server configuration, feature utility properties, interim fixes, and the application WAR file, followed by execution scripts to configure the server and optimize runtime.
```dockerfile
FROM icr.io/appcafe/websphere-liberty:kernel-java17-openj9-ubi
# Default setting for the verbose option. Set it to true to debug the application container image build failures
ARG VERBOSE=false
# Add Liberty server configuration including all necessary features
COPY --chown=1001:0 server.xml /config/
# Modify feature repository (optional)
# A sample is in the 'Getting Required Features' section below
COPY --chown=1001:0 featureUtility.properties /opt/ibm/wlp/etc/
# This script will add the requested XML snippets to enable Liberty features and grow the image to be fit-for-purpose using featureUtility.
RUN features.sh
# Add interim fixes (optional)
COPY --chown=1001:0 interim-fixes /opt/ibm/fixes/
# Add application
COPY --chown=1001:0 Sample1.war /config/dropins/
# This script will add the requested server configurations, apply any interim fixes and populate caches to optimize runtime
RUN configure.sh
```
--------------------------------
### Configure IIOP Endpoint Snippet
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This snippet adds configuration properties for an IIOP endpoint. It can be used with or without SSL enabled, and requires the `env.IIOP_ENDPOINT_HOST` environment variable to be set.
```XML
```
```XML
```
--------------------------------
### Run Docker Container with JSON Logging Configuration
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
Demonstrates how to run a WebSphere Liberty Docker container with specific environment variables set to enable JSON logging. This command maps ports and passes logging configurations using the '-e' option.
```Shell
docker run -d -p 80:9080 -p 443:9443 -e WLP_LOGGING_CONSOLE_FORMAT=JSON -e WLP_LOGGING_CONSOLE_LOGLEVEL=info -e WLP_LOGGING_CONSOLE_SOURCE=message,trace,accessLog,ffdc,audit websphere-liberty:latest
```
--------------------------------
### Properties: Configure Feature Utility Remote Repository
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This properties file configures the `featureUtility` to download Liberty features from an alternative remote server instead of the default Maven Central repository. It specifies the URL, username, and password for the custom repository.
```properties
remoteRepo.url=https://my-remote-server/secure/maven2
remoteRepo.user=operator
remoteRepo.password={aes}KM8dhwcv892Ss1sawu9R+
```
--------------------------------
### Configure HTTP Endpoint Snippet
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This snippet configures properties for an HTTP endpoint. It can be used with or without SSL enabled, with different XML file references depending on the SSL configuration.
```XML
```
```XML
```
--------------------------------
### Infinispan Client Session Cache Configuration
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This XML snippet configures the Infinispan client for session caching in IBM Liberty. It specifies the necessary Infinispan client properties and enables the Liberty sessionCache-1.0 feature.
```XML
example-infinispan
11222
```
--------------------------------
### Configure MicroProfile Health Check Snippet
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This snippet enables health checking for the environment using the Liberty feature `mpHealth-1.0`, which implements MicroProfile Health. It is configured via an XML snippet.
```XML
mpHealth-1.0
```
--------------------------------
### Configure JMS Endpoint Snippet
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This snippet configures properties for a JMS endpoint. It supports both SSL-enabled and non-SSL configurations, with distinct XML snippet references for each.
```XML
```
```XML
```
--------------------------------
### Apply Interim Fixes in Dockerfile
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This Dockerfile snippet shows how to apply interim fixes to a Liberty image during the build process. It copies JAR files from a local directory into the container's `/opt/ibm/fixes/` directory and then executes the `configure.sh` script, which is responsible for applying these fixes.
```dockerfile
# Add interim fixes (optional)
COPY --chown=1001:0 interim-fixes /opt/ibm/fixes/
# Default setting for the verbose option
ARG VERBOSE=false
# This script will add the requested XML snippets, grow image to be fit-for-purpose and apply interim fixes
RUN configure.sh
```
--------------------------------
### XML Snippet: Configure Transport Security (SSL)
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This XML snippet configures Transport Security (SSL) for WebSphere Liberty by adding the `transportSecurity-1.0` feature. This is essential for enabling secure communication channels.
```xml
transportSecurity-1.0
```
--------------------------------
### Configure WebSphere Liberty JSON Logging in Dockerfile
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
Sets environment variables in a Dockerfile to configure WebSphere Liberty to emit JSON-formatted logs to the console. This includes specifying the log format, log level, and the sources of log events.
```Dockerfile
ENV WLP_LOGGING_CONSOLE_FORMAT=JSON
ENV WLP_LOGGING_CONSOLE_LOGLEVEL=info
ENV WLP_LOGGING_CONSOLE_SOURCE=message,trace,accessLog,ffdc,audit
```
--------------------------------
### XML Snippet: Enable Hazelcast Session Cache
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This XML snippet is used to enable the persistence of HTTP sessions using JCache by adding the `sessionCache-1.0` feature to WebSphere Liberty. It is typically included during the Docker image build process.
```xml
sessionCache-1.0
```
--------------------------------
### Host Feature Repository with Nginx Docker Container
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This snippet demonstrates how to run an Nginx container to serve files from a local directory, which can be used as a feature repository for WebSphere Liberty. It maps a local directory to the Nginx web root and exposes the container's port.
```bash
docker run --name repo-host -v /repo-host:/usr/share/nginx/html:ro -p 8080:80 -d nginx
```
--------------------------------
### Configure SSO: Liberty Operator YAML Example
Source: https://github.com/wasdev/ci.docker/blob/main/SECURITY.md
Illustrates how Single Sign-On (SSO) configurations, including provider-specific details like client ID and secret, can be managed through a Liberty operator YAML file during container deployment. This method is often preferred for security over build-time environment variables.
```YAML
# Example snippet within a Liberty Operator deployment YAML
# ...
spec:
env:
- name: SEC_SSO_PROVIDERS
value: "google twitter"
- name: SEC_SSO_GOOGLE_CLIENTID
valueFrom:
secretKeyRef:
name: sso-secrets
key: google-client-id
- name: SEC_SSO_GOOGLE_CLIENTSECRET
valueFrom:
secretKeyRef:
name: sso-secrets
key: google-client-secret
# ...
```
--------------------------------
### Enable Hazelcast Session Caching in Dockerfile
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This Dockerfile snippet configures Hazelcast for session caching in Liberty. It copies Hazelcast client libraries, sets an argument to specify the Hazelcast topology (client or embedded), and runs a configure script to apply the settings. It also includes commented-out options for embedded topology and Java system properties.
```dockerfile
### Hazelcast Session Caching ###
# Copy the Hazelcast libraries from the Hazelcast container image
COPY --from=hazelcast/hazelcast --chown=1001:0 /opt/hazelcast/lib/*.jar /opt/ibm/wlp/usr/shared/resources/hazelcast/
# Instruct configure.sh to copy the client topology hazelcast.xml
ARG HZ_SESSION_CACHE=client
# Default setting for the verbose option
ARG VERBOSE=false
# Instruct configure.sh to copy the embedded topology hazelcast.xml and set the required system property
#ARG HZ_SESSION_CACHE=embedded
#ENV JAVA_TOOL_OPTIONS "-Dhazelcast.jcache.provider.type=server ${JAVA_TOOL_OPTIONS}"
## This script will add the requested XML snippets and grow image to be fit-for-purpose
RUN configure.sh
```
--------------------------------
### Configure SCC Read-Only Exception in Dockerfile
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
Illustrates how to set the OPENJ9_JAVA_OPTIONS environment variable in a Dockerfile to allow the Shared Class Cache (SCC) to add more data at runtime by not marking it as read-only. This is done by including specific JVM options.
```Dockerfile
ENV OPENJ9_JAVA_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,nonFatal -Dosgi.checkConfiguration=false"
```
--------------------------------
### Build and Test All Docker Images for a Release
Source: https://github.com/wasdev/ci.docker/blob/main/test/README.md
Builds and tests all WebSphere Liberty Docker images for a specified release version. This script automates the process for a given release.
```bash
sh buildAll.sh
```
--------------------------------
### WebSphere Liberty Beta and Test Images
Source: https://github.com/wasdev/ci.docker/blob/main/ga/25.0.0.3/images.txt
This snippet lists the Dockerfile references for beta and various test images of WebSphere Liberty. It includes tags for beta releases and specific test applications like stock-quote, stock-trader, and pet-clinic.
```Dockerfile
websphere-liberty:beta ../beta
websphere-liberty:test-stock-quote test-stock-quote
websphere-liberty:test-stock-trader test-stock-trader
websphere-liberty:test-pet-clinic test-pet-clinic
```
--------------------------------
### Build and Test Specific Docker Image
Source: https://github.com/wasdev/ci.docker/blob/main/test/README.md
Builds and verifies a specific WebSphere Liberty Docker image. Requires the image name, Dockerfile location, and optionally the Dockerfile name for the build script, followed by the image name for the verification script.
```bash
sh build.sh
```
```bash
sh verify.sh
```
--------------------------------
### Pull WebSphere Liberty Image from ICR
Source: https://github.com/wasdev/ci.docker/blob/main/docs/icr-images.md
Example of how to pull a specific WebSphere Liberty image from the IBM Container Registry (ICR). This command appends a tag to the base image URL to specify the desired version and configuration.
```bash
icr.io/appcafe/websphere-liberty:25.0.0.6-kernel-java17-openj9-ubi
```
--------------------------------
### WebSphere Liberty Beta and Test Images
Source: https://github.com/wasdev/ci.docker/blob/main/ga/25.0.0.8/images.txt
This snippet lists special WebSphere Liberty images, including a beta version and images for specific test scenarios like stock quote, stock trader, and pet clinic.
```Dockerfile
websphere-liberty:beta
../beta
```
```Dockerfile
websphere-liberty:test-stock-quote
test-stock-quote
```
```Dockerfile
websphere-liberty:test-stock-trader
test-stock-trader
```
```Dockerfile
websphere-liberty:test-pet-clinic
test-pet-clinic
```
--------------------------------
### WebSphere Liberty Beta and Test Images
Source: https://github.com/wasdev/ci.docker/blob/main/ga/25.0.0.6/images.txt
This snippet lists the Dockerfiles for beta and test versions of WebSphere Liberty. It includes tags for beta, stock-quote, stock-trader, and pet-clinic applications.
```Dockerfile
websphere-liberty:beta ../beta
websphere-liberty:test-stock-quote test-stock-quote
websphere-liberty:test-stock-trader test-stock-trader
websphere-liberty:test-pet-clinic test-pet-clinic
```
--------------------------------
### Configure TLS: Provide Custom Keystore
Source: https://github.com/wasdev/ci.docker/blob/main/SECURITY.md
Allows providing a custom keystore (key.p12) during the image build phase by copying it to /output/resources/security/key.p12. The keystore's password must be overridden by including a keystore.xml file in the /config/configDropins/defaults/ directory.
```Dockerfile
COPY key.p12 /output/resources/security/key.p12
COPY keystore.xml /config/configDropins/defaults/
```
--------------------------------
### Mount Infinispan Secret in Liberty Container
Source: https://github.com/wasdev/ci.docker/blob/main/README.md
This YAML snippet demonstrates how to mount a Kubernetes secret containing Infinispan credentials as a volume within a Liberty container. It specifies the secret name, volume name, and the mount path inside the container. The secret is mounted read-only.
```yaml
...
spec:
volumes:
- name: infinispan-secret-volume
secret:
secretName: example-infinispan-generated-secret
containers:
- name: servera-container
image: ol-runtime-infinispan-client:1.0.0
ports:
- containerPort: 9080
volumeMounts:
- name: infinispan-secret-volume
readOnly: true
mountPath: "/platform/bindings/infinispan/secret/"
...
```
--------------------------------
### Sync Repository Script
Source: https://github.com/wasdev/ci.docker/blob/main/tools/README.md
This script synchronizes the WebSphere Application Server Liberty Profile repositories. It requires the kernel version (or 'beta') and the target repository as arguments.
```shell
sh syncRepository.sh
```
--------------------------------
### Configure SSO: Specify Identity Providers
Source: https://github.com/wasdev/ci.docker/blob/main/SECURITY.md
Configures Single Sign-On (SSO) by specifying a space-delimited list of identity providers using the SEC_SSO_PROVIDERS build argument. Multiple OIDC and OAuth2 providers can be included, with unique names for each.
```Dockerfile
ARG SEC_SSO_PROVIDERS="google twitter github"
# Example with multiple OIDC/OAuth2 providers:
# ARG SEC_SSO_PROVIDERS="google oidc:provider1,provider2 oauth2:provider3,provider4"
```
--------------------------------
### Build Docker Image
Source: https://github.com/wasdev/ci.docker/blob/main/ga/production-upgrade/README.md
Builds a Docker image for WebSphere Liberty. This command assumes the Dockerfile is in the current directory and tags the image with a user-specified name.
```bash
docker build -t .
```
--------------------------------
### WebSphere Liberty Full Dockerfiles
Source: https://github.com/wasdev/ci.docker/blob/main/ga/25.0.0.6/images.txt
This snippet lists the Dockerfiles for the full WebSphere Liberty images. It includes image tags, the directory path, and the specific Dockerfile name, indicating the base OS and Java runtime.
```Dockerfile
websphere-liberty:25.0.0.6-full ../ga/25.0.0.6/full ../ga/25.0.0.6/full/Dockerfile.ubuntu.ibmjava8
websphere-liberty:25.0.0.6-full-java11-openj9 ../ga/25.0.0.6/full ../ga/25.0.0.6/full/Dockerfile.ubuntu.openjdk11
websphere-liberty:25.0.0.6-full-java17-openj9 ../ga/25.0.0.6/full ../ga/25.0.0.6/full/Dockerfile.ubuntu.openjdk17
websphere-liberty:25.0.0.6-full-java8-ibmjava-ubi ../ga/25.0.0.6/full ../ga/25.0.0.6/full/Dockerfile.ubi.ibmjava8
websphere-liberty:25.0.0.6-full-java8-openj9-ubi ../ga/25.0.0.6/full ../ga/25.0.0.6/full/Dockerfile.ubi.openjdk8
websphere-liberty:25.0.0.6-full-java11-openj9-ubi ../ga/25.0.0.6/full ../ga/25.0.0.6/full/Dockerfile.ubi.openjdk11
websphere-liberty:25.0.0.6-full-java17-openj9-ubi ../ga/25.0.0.6/full ../ga/25.0.0.6/full/Dockerfile.ubi.openjdk17
```
--------------------------------
### Check Repository Sync Script
Source: https://github.com/wasdev/ci.docker/blob/main/tools/README.md
This script checks and synchronizes the WebSphere Application Server Liberty Profile repositories. It requires the kernel version (or 'beta') and the target repository as arguments.
```shell
sh checkRepositorySync.sh
```
--------------------------------
### Configure SSO: Run Configuration Script
Source: https://github.com/wasdev/ci.docker/blob/main/SECURITY.md
Applies the Single Sign-On (SSO) and other security configurations by executing the configure.sh script during the Docker image build process. This command must be called for the defined arguments and environment variables to take effect.
```Dockerfile
RUN configure.sh
```
--------------------------------
### Configure SSO: Set Redirect Host and Port
Source: https://github.com/wasdev/ci.docker/blob/main/SECURITY.md
Specifies the protocol, host, and port that identity providers should use to redirect the browser back to the application after authentication. This is crucial for SSO functionality, especially in containerized environments where the pod might not automatically determine this information.
```Dockerfile
ENV SEC_SSO_REDIRECTTORPHOSTANDPORT="https://myApp-myNamespace-myClusterHostname.mycompany.com"
```
--------------------------------
### WebSphere Liberty Full Dockerfiles
Source: https://github.com/wasdev/ci.docker/blob/main/ga/25.0.0.3/images.txt
This snippet lists the Dockerfiles for the full WebSphere Liberty images. It includes tags for the full image with IBM Java 8 and OpenJ9 for Java 11 and 17 on Ubuntu, and similar configurations for UBI-based images.
```Dockerfile
websphere-liberty:25.0.0.3-full ../ga/25.0.0.3/full ../ga/25.0.0.3/full/Dockerfile.ubuntu.ibmjava8
websphere-liberty:25.0.0.3-full-java11-openj9 ../ga/25.0.0.3/full ../ga/25.0.0.3/full/Dockerfile.ubuntu.openjdk11
websphere-liberty:25.0.0.3-full-java17-openj9 ../ga/25.0.0.3/full ../ga/25.0.0.3/full/Dockerfile.ubuntu.openjdk17
websphere-liberty:25.0.0.3-full-java8-ibmjava-ubi ../ga/25.0.0.3/full ../ga/25.0.0.3/full/Dockerfile.ubi.ibmjava8
websphere-liberty:25.0.0.3-full-java8-openj9-ubi ../ga/25.0.0.3/full ../ga/25.0.0.3/full/Dockerfile.ubi.openjdk8
websphere-liberty:25.0.0.3-full-java11-openj9-ubi ../ga/25.0.0.3/full ../ga/25.0.0.3/full/Dockerfile.ubi.openjdk11
websphere-liberty:25.0.0.3-full-java17-openj9-ubi ../ga/25.0.0.3/full ../ga/25.0.0.3/full/Dockerfile.ubi.openjdk17
```
--------------------------------
### Configure TLS: Trust Default Certificates
Source: https://github.com/wasdev/ci.docker/blob/main/SECURITY.md
Enables the container to trust certificates from known certificate authorities by setting the SEC_TLS_TRUSTDEFAULTCERTS environment variable to true. This utilizes the default certificates from the JVM in addition to the configured truststore file.
```Dockerfile
ENV SEC_TLS_TRUSTDEFAULTCERTS=true
```
--------------------------------
### Build Docker Image (Shell Command)
Source: https://github.com/wasdev/ci.docker/blob/main/ga/25.0.0.3/kernel/README.md
This snippet shows the shell command to build the Docker image from the Dockerfile located in the current directory.
```Shell
docker build .
```
--------------------------------
### Apply Interim Fixes using Dockerfile
Source: https://github.com/wasdev/ci.docker/blob/main/ga/applying-ifixes/README.md
This snippet demonstrates how to apply interim fixes during the Docker build process. It involves copying the interim fix JAR files into the '/fixes' directory and then executing the 'configure.sh' script to apply them.
```dockerfile
# Add interim fixes (optional)
COPY --chown=1001:0 interim-fixes /fixes/
# This script will add the requested XML snippets, grow image to be fit-for-purpose and apply interim fixes
RUN configure.sh
```
--------------------------------
### WebSphere Liberty Kernel Dockerfiles
Source: https://github.com/wasdev/ci.docker/blob/main/ga/25.0.0.3/images.txt
This snippet details the Dockerfiles used to build the WebSphere Liberty kernel images. It specifies the image tag, the build path, and the Dockerfile for Ubuntu-based images with IBM Java 8 and OpenJ9 for Java 11 and 17, as well as UBI-based images for the same Java runtimes.
```Dockerfile
websphere-liberty:25.0.0.3-kernel ../ga/25.0.0.3/kernel ../ga/25.0.0.3/kernel/Dockerfile.ubuntu.ibmjava8
websphere-liberty:25.0.0.3-kernel-java11-openj9 ../ga/25.0.0.3/kernel ../ga/25.0.0.3/kernel/Dockerfile.ubuntu.openjdk11
websphere-liberty:25.0.0.3-kernel-java17-openj9 ../ga/25.0.0.3/kernel ../ga/25.0.0.3/kernel/Dockerfile.ubuntu.openjdk17
websphere-liberty:25.0.0.3-kernel-java8-ibmjava-ubi ../ga/25.0.0.3/kernel ../ga/25.0.0.3/kernel/Dockerfile.ubi.ibmjava8
websphere-liberty:25.0.0.3-kernel-java8-openj9-ubi ../ga/25.0.0.3/kernel ../ga/25.0.0.3/kernel/Dockerfile.ubi.openjdk8
websphere-liberty:25.0.0.3-kernel-java11-openj9-ubi ../ga/25.0.0.3/kernel ../ga/25.0.0.3/kernel/Dockerfile.ubi.openjdk11
websphere-liberty:25.0.0.3-kernel-java17-openj9-ubi ../ga/25.0.0.3/kernel ../ga/25.0.0.3/kernel/Dockerfile.ubi.openjdk17
```
--------------------------------
### Build Docker Image
Source: https://github.com/wasdev/ci.docker/blob/main/ga/latest/kernel/README.md
Builds the WebSphere Liberty kernel Docker image from the current directory. This command assumes the Dockerfile is present.
```Shell
docker build .
```
--------------------------------
### Build Docker Image
Source: https://github.com/wasdev/ci.docker/blob/main/ga/25.0.0.8/kernel/README.md
Builds the WebSphere Liberty kernel Docker image using the Dockerfile in the current directory. This command is typically executed after cloning the repository and navigating to the appropriate version directory.
```Shell
docker build .
```
--------------------------------
### Build Docker Image
Source: https://github.com/wasdev/ci.docker/blob/main/ga/25.0.0.6/kernel/README.md
Builds the WebSphere Liberty kernel Docker image using the Dockerfile in the current directory. This command is typically executed after cloning the repository and navigating to the appropriate version directory.
```Shell
docker build .
```
--------------------------------
### WebSphere Liberty Beta Docker Image
Source: https://github.com/wasdev/ci.docker/blob/main/ga/latest/images.txt
Specifies the Docker image for the beta version of WebSphere Liberty, sourced from the '../beta' directory.
```Dockerfile
FROM ../beta
# Tag: websphere-liberty:beta
```
--------------------------------
### Configure SSO: Enable HTTPS
Source: https://github.com/wasdev/ci.docker/blob/main/SECURITY.md
Ensures that Single Sign-On (SSO) providers, which typically require HTTPS, can be used by setting the TLS build argument to true. This is a prerequisite for most SSO configurations.
```Dockerfile
ARG TLS=true
```
--------------------------------
### Configure TLS: Provide Custom Certificates
Source: https://github.com/wasdev/ci.docker/blob/main/SECURITY.md
Enables the use of custom PEM certificates by mounting them into the container. The TLS_DIR environment variable specifies the location for these files (defaulting to /etc/x509/certs/). The container automatically converts PEM files into keystore and truststore files (key.p12 and trust.p12).
```Dockerfile
ENV TLS_DIR=/path/to/your/certs/
```
--------------------------------
### Build Docker Image (Dockerfile)
Source: https://github.com/wasdev/ci.docker/blob/main/ga/25.0.0.3/kernel/README.md
This snippet demonstrates how to build the WebSphere Liberty kernel Docker image using a Dockerfile. It assumes the Dockerfile is in the current directory.
```Dockerfile
FROM ubuntu:latest
# Install dependencies and WebSphere Liberty Kernel
RUN apt-get update && apt-get install -y --no-install-recommends \
\
&& \
rm -rf /var/lib/apt/lists/*
# Add WebSphere Liberty Kernel
COPY /opt/ibm/wlp/
# Expose default Liberty port
EXPOSE 9080
# Default command to start Liberty
CMD ["/opt/ibm/wlp/bin/server", "run", "defaultServer"]
```