Skip to content

Commit 56c533e

Browse files
author
Simon Stone
committed
[FAB-6415] Upgrade Docker image to Java 11
Use a Docker image from the AdoptOpenJDK project, built on top of Alpine 3.10, using the HotSpot flavour of 11.0.4_11. Further work will be done to investigate the use of the "slim" flavour of this image, along with the OpenJ9 flavour in terms of performance. Signed-off-by: Simon Stone <[email protected]> Change-Id: Idefd7c399ec58c77bf498a3e3c216d6b8d1d83b5
1 parent 5dbbea7 commit 56c533e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

fabric-chaincode-docker/Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
FROM openjdk:8-slim as builder
2-
RUN apt-get update -y && apt-get upgrade -y && apt-get install curl -y && apt-get install zip -y
1+
FROM adoptopenjdk/openjdk11:jdk-11.0.4_11-alpine as builder
2+
RUN apk add --no-cache bash curl zip
33

44
RUN curl -s "https://get.sdkman.io" | bash
55

@@ -8,9 +8,8 @@ SHELL ["/bin/bash", "-c"]
88
RUN source /root/.sdkman/bin/sdkman-init.sh; sdk install gradle 5.6.2
99
RUN source /root/.sdkman/bin/sdkman-init.sh; sdk install maven 3.6.2
1010

11-
FROM openjdk:8-slim as dependencies
12-
RUN apt-get update -y && apt-get upgrade -y
13-
RUN apt-get install wget -y
11+
FROM adoptopenjdk/openjdk11:jdk-11.0.4_11-alpine as dependencies
12+
RUN apk add --no-cache bash wget
1413

1514
COPY --from=builder /root/.sdkman/candidates/gradle/current /usr/bin/gradle
1615
COPY --from=builder /root/.sdkman/candidates/maven/current /usr/bin/maven
@@ -70,8 +69,8 @@ RUN rm -rf shim-src
7069

7170
# Creating final javaenv image which will include all required
7271
# dependencies to build and compile java chaincode
73-
FROM openjdk:8-slim
74-
RUN apt-get update -y && apt-get upgrade -y
72+
FROM adoptopenjdk/openjdk11:jdk-11.0.4_11-alpine
73+
RUN apk add --no-cache bash
7574
COPY --from=builder /root/.sdkman/candidates/gradle/current /usr/bin/gradle
7675
COPY --from=builder /root/.sdkman/candidates/maven/current /usr/bin/maven
7776

0 commit comments

Comments
 (0)