You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-10Lines changed: 28 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@
19
19
20
20
## Container images
21
21
22
-
* Our recommended set uses Red Hat's [Universal Base Image](https://www.redhat.com/en/blog/introducing-red-hat-universal-base-image) as the Operating System and are re-built daily. They are available from [IBM Container Registry](docs/icr-images.md) and [Docker Hub](https://hub.docker.com/r/ibmcom/websphere-liberty).
22
+
* Our recommended set uses Red Hat's Universal Base Image (UBI) as the Operating System and are re-built daily. They are available from [IBM Container Registry (ICR)](docs/icr-images.md) and [Docker Hub](https://hub.docker.com/r/ibmcom/websphere-liberty). We strongly recommend using the images in ICR. Unlike Docker Hub, pulls from ICR are not rate limited.
23
23
* Another set, using Ubuntu as the Operating System can be found on [Docker Hub](https://hub.docker.com/_/websphere-liberty). These are re-built automatically anytime something changes in the layers below.
24
24
25
25
## Building an application image
@@ -29,27 +29,45 @@ According to best practices for container images, you should create a new image
29
29
Your application image template should follow a pattern similar to:
30
30
31
31
```dockerfile
32
-
FROM icr.io/appcafe/websphere-liberty:kernel-java8-openj9-ubi
32
+
FROM icr.io/appcafe/websphere-liberty:kernel-java17-openj9-ubi
33
+
34
+
# Default setting for the verbose option. Set it to true to debug the application container image build failures
35
+
ARG VERBOSE=false
33
36
34
37
# Add Liberty server configuration including all necessary features
35
38
COPY --chown=1001:0 server.xml /config/
36
39
37
-
# This script will add the requested XML snippets to enable Liberty features and grow image to be fit-for-purpose using featureUtility.
38
-
# Only available in 'kernel'. The 'full' tag already includes all features for convenience.
40
+
# Modify feature repository (optional)
41
+
# A sample is in the 'Getting Required Features' section below
# This script will add the requested XML snippets to enable Liberty features and grow the image to be fit-for-purpose using featureUtility.
39
45
RUN features.sh
40
46
41
47
# Add interim fixes (optional)
42
48
COPY --chown=1001:0 interim-fixes /opt/ibm/fixes/
43
49
44
-
# Add app
50
+
# Add application
45
51
COPY --chown=1001:0 Sample1.war /config/dropins/
46
52
47
-
# This script will add the requested XML snippets, grow image to be fit-for-purpose and apply interim fixes
53
+
# This script will add the requested server configurations, apply any interim fixes and populate caches to optimize runtime
48
54
RUN configure.sh
49
55
```
50
56
51
57
This will result in a container image that has your application and configuration pre-loaded, which means you can spawn new fully-configured containers at any time.
52
58
59
+
### Getting Required Features
60
+
61
+
The `kernel` tag provides just the bare minimum server. You can grow it to include the features needed by your application by invoking `features.sh`.
62
+
Liberty features are downloaded from Maven Central repository by default. But you can specify alternatives using `/opt/ibm/wlp/etc/featureUtility.properties`:
Refer to [Repository and proxy modifications](https://openliberty.io/docs/ref/command/featureUtility-modifications.html) for more information.
70
+
53
71
## Optional Enterprise Functionality
54
72
55
73
This section describes the optional enterprise functionality that can be enabled via the Dockerfile during `build` time, by setting particular argument (`ARG`) or environment variable (`ENV`) and calling `RUN configure.sh`. Each of these options trigger the inclusion of specific configuration via XML snippets (except for `VERBOSE`), described below:
@@ -153,14 +171,14 @@ The Liberty session caching feature builds on top of an existing technology call
153
171
154
172
```dockerfile
155
173
### Infinispan Session Caching ###
156
-
FROM icr.io/appcafe/websphere-liberty:kernel-java8-openj9-ubi AS infinispan-client
174
+
FROM icr.io/appcafe/websphere-liberty:kernel-java17-openj9-ubi AS infinispan-client
157
175
158
176
# Install Infinispan client jars
159
177
USER root
160
178
RUN infinispan-client-setup.sh
161
179
USER 1001
162
180
163
-
FROM icr.io/appcafe/websphere-liberty:kernel-java8-openj9-ubi AS open-liberty-infinispan
181
+
FROM icr.io/appcafe/websphere-liberty:kernel-java17-openj9-ubi AS open-liberty-infinispan
164
182
165
183
# Copy Infinispan client jars to Open Liberty shared resources
0 commit comments