Skip to content

Commit f8023bf

Browse files
authored
Merge pull request #131 from OpenLiberty/staging
Merge staging to prod - Change to use kernel-slim image
2 parents 5d98ce2 + 358a7bb commit f8023bf

File tree

6 files changed

+25
-8
lines changed

6 files changed

+25
-8
lines changed

Diff for: README.adoc

+15-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ and then uses the Open Liberty [hotspot=springBootUtility]`springBootUtility` co
130130

131131
The second stage begins with the [hotspot=OLimage2 file=0]`Open Liberty Docker image`. The Dockerfile copies the [hotspot=serverXml file=0]`server.xml` file from the `/opt/ol/wlp/templates` directory, which enables Spring Boot and TLS support. Then, the Dockerfile copies the Spring Boot dependent library JAR files that are at the [hotspot=libcache file=0]`lib.index.cache` directory and the [hotspot=thinjar file=0]`thin-guide-spring-boot-0.1.0.jar` file. The `lib.index.cache` directory and the `thin-guide-spring-boot-0.1.0.jar` file were both generated in the first stage.
132132

133-
include::{common-includes}/ol-icr-full-docker-pull.adoc[]
133+
134134

135135
Use the following command to build the Docker image:
136136
[role='command']
@@ -149,7 +149,7 @@ Your `springboot` image appears in the list of Docker images:
149149
[role='no_copy']
150150
```
151151
REPOSITORY TAG IMAGE ID CREATED SIZE
152-
springboot latest d3ffdaa81854 27 seconds ago 486MB
152+
springboot latest d3ffdaa81854 27 seconds ago 596MB
153153
```
154154

155155
Now, you can run the Spring Boot application in a Docker container:
@@ -281,6 +281,12 @@ mvnw.cmd liberty:run
281281
```
282282
--
283283

284+
After you see the following message, your application server is ready:
285+
[role="no_copy"]
286+
----
287+
The defaultServer server is ready to run a smarter planet.
288+
----
289+
284290
// Static guide instruction
285291
ifndef::cloud-hosted[]
286292
Go to the http://localhost:9080/hello[^] URL to access the application.
@@ -367,6 +373,13 @@ Run the repackaged Spring Boot application. This JAR file was defined previously
367373
java -jar target/GSSpringBootApp.jar
368374
```
369375

376+
After you see the following message, your application server is ready:
377+
378+
[role="no_copy"]
379+
----
380+
The defaultServer server is ready to run a smarter planet.
381+
----
382+
370383
// Static guide instruction
371384
ifndef::cloud-hosted[]
372385
Go to the http://localhost:9080/hello[^] URL to access the application.

Diff for: finish/Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Stage and thin the application
22
# tag::OLimage1[]
3-
FROM icr.io/appcafe/open-liberty:full-java11-openj9-ubi as staging
3+
FROM icr.io/appcafe/open-liberty:full-java8-openj9-ubi as staging
44
# end::OLimage1[]
55

66
# tag::copyJar[]
@@ -17,7 +17,7 @@ RUN springBootUtility thin \
1717

1818
# Build the image
1919
# tag::OLimage2[]
20-
FROM icr.io/appcafe/open-liberty:full-java11-openj9-ubi
20+
FROM icr.io/appcafe/open-liberty:kernel-slim-java8-openj9-ubi
2121
# end::OLimage2[]
2222

2323
ARG VERSION=1.0
@@ -40,6 +40,8 @@ LABEL \
4040
RUN cp /opt/ol/wlp/templates/servers/springBoot2/server.xml /config/server.xml
4141
# end::serverXml[]
4242

43+
RUN features.sh
44+
4345
# tag::libcache[]
4446
COPY --chown=1001:0 --from=staging /staging/lib.index.cache /lib.index.cache
4547
# end::libcache[]

Diff for: finish/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
<plugin>
7272
<groupId>io.openliberty.tools</groupId>
7373
<artifactId>liberty-maven-plugin</artifactId>
74-
<version>3.7.1</version>
74+
<version>3.8.2</version>
7575
<configuration>
7676
<!-- tag::appsDirectory[] -->
7777
<appsDirectory>apps</appsDirectory>

Diff for: scripts/dailyBuild.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ echo "Testing daily build image"
1414
sed -i "\#<artifactId>liberty-maven-plugin</artifactId>#,\#<configuration>#c<artifactId>liberty-maven-plugin</artifactId><version>3.5.1</version><configuration><install><runtimeUrl>https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/nightly/$DATE/$DRIVER</runtimeUrl></install>" pom.xml
1515
cat pom.xml
1616

17-
sed -i "s;FROM icr.io/appcafe/open-liberty:full-java11-openj9-ubi;FROM $DOCKER_USERNAME/olguides:$BUILD;g" Dockerfile
17+
sed -i "s;FROM icr.io/appcafe/open-liberty:kernel-slim-java8-openj9-ubi;FROM $DOCKER_USERNAME/olguides:$BUILD;g" Dockerfile
18+
sed -i "s;RUN features.sh;#RUN features.sh;g" Dockerfile
1819
cat Dockerfile
1920

2021
sudo ../scripts/testApp.sh

Diff for: scripts/dockerImageTest.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ echo "Testing latest OpenLiberty Docker image"
1212
sed -i "\#<artifactId>liberty-maven-plugin</artifactId>#,\#<configuration>#c<artifactId>liberty-maven-plugin</artifactId><version>3.2.3</version><configuration><install><runtimeUrl>https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/nightly/""$DATE""/""$DRIVER""</runtimeUrl></install>" pom.xml
1313
cat pom.xml
1414

15-
sed -i "s;FROM icr.io/appcafe/open-liberty:full-java11-openj9-ubi;FROM openliberty/daily:latest;g" Dockerfile
15+
sed -i "s;FROM icr.io/appcafe/open-liberty:kernel-slim-java8-openj9-ubi;FROM openliberty/daily:latest;g" Dockerfile
16+
sed -i "s;RUN features.sh;#RUN features.sh;g" Dockerfile
1617
cat Dockerfile
1718

1819
docker pull -q "openliberty/daily:latest"

Diff for: scripts/testApp.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ set -euxo pipefail
1212
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 \
1313
-q clean package
1414

15-
docker pull -q icr.io/appcafe/open-liberty:full-java11-openj9-ubi
15+
docker pull -q icr.io/appcafe/open-liberty:kernel-slim-java8-openj9-ubi
1616

1717
docker build -t springboot .
1818
docker run -d --name springBootContainer -p 9080:9080 -p 9443:9443 springboot

0 commit comments

Comments
 (0)