Skip to content

Commit 37bebee

Browse files
mbwhitejt-nti
authored andcommitted
Adjust to using the Temurin JVM
As prepration for ARM builds for M1 Mac, this has to be swapped to the Ubnuntu not alpine based image. Signed-off-by: Matthew B White <[email protected]>
1 parent 0c9f44f commit 37bebee

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

fabric-chaincode-docker/Dockerfile

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
FROM adoptopenjdk/openjdk11:jdk-11.0.4_11-alpine as builder
2-
RUN apk add --no-cache bash curl zip
3-
1+
FROM eclipse-temurin:11.0.16.1_1-jdk as builder
2+
ENV DEBIAN_FRONTEND=noninteractive
3+
4+
# Build tools
5+
RUN apt-get update \
6+
&& apt-get -y install zip unzip \
7+
&& apt-get clean \
8+
&& rm -rf /var/lib/apt/lists/*
49
RUN curl -s "https://get.sdkman.io" | bash
510

611
SHELL ["/bin/bash", "-c"]
712

813
RUN source /root/.sdkman/bin/sdkman-init.sh; sdk install gradle 7.0
914
RUN source /root/.sdkman/bin/sdkman-init.sh; sdk install maven 3.8.1
1015

11-
FROM adoptopenjdk/openjdk11:jdk-11.0.4_11-alpine as dependencies
12-
RUN apk add --no-cache bash wget
16+
FROM eclipse-temurin:11.0.16.1_1-jdk as dependencies
1317

1418
COPY --from=builder /root/.sdkman/candidates/gradle/current /usr/bin/gradle
1519
COPY --from=builder /root/.sdkman/candidates/maven/current /usr/bin/maven
@@ -54,8 +58,12 @@ RUN mvn -N io.takari:maven:wrapper
5458

5559
# Creating final javaenv image which will include all required
5660
# dependencies to build and compile java chaincode
57-
FROM adoptopenjdk/openjdk11:jdk-11.0.4_11-alpine
58-
RUN apk add --no-cache bash
61+
FROM eclipse-temurin:11.0.16.1_1-jdk
62+
63+
RUN apt-get update \
64+
&& apt-get -y install zip unzip \
65+
&& apt-get clean \
66+
&& rm -rf /var/lib/apt/lists/*
5967

6068
SHELL ["/bin/bash", "-c"]
6169

0 commit comments

Comments
 (0)