Skip to content

Commit

Permalink
Adjust to using the Temurin JVM
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
mbwhite authored and jt-nti committed Oct 13, 2022
1 parent 0c9f44f commit 37bebee
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions fabric-chaincode-docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
FROM adoptopenjdk/openjdk11:jdk-11.0.4_11-alpine as builder
RUN apk add --no-cache bash curl zip

FROM eclipse-temurin:11.0.16.1_1-jdk as builder
ENV DEBIAN_FRONTEND=noninteractive

# Build tools
RUN apt-get update \
&& apt-get -y install zip unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN curl -s "https://get.sdkman.io" | bash

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

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

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

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

# Creating final javaenv image which will include all required
# dependencies to build and compile java chaincode
FROM adoptopenjdk/openjdk11:jdk-11.0.4_11-alpine
RUN apk add --no-cache bash
FROM eclipse-temurin:11.0.16.1_1-jdk

RUN apt-get update \
&& apt-get -y install zip unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

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

Expand Down

0 comments on commit 37bebee

Please sign in to comment.