Skip to content

Commit a2f657c

Browse files
authored
clients/besu: use ubuntu base image and install java (#889)
use ubuntu base image and install java Signed-off-by: Sally MacFarlane <[email protected]>
1 parent d93265f commit a2f657c

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

clients/besu/Dockerfile.git

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
### Build Besu From Git:
22

33
## Builder stage: Compiles besu from a git repository
4-
FROM openjdk:17-jdk-slim as builder
4+
FROM ubuntu:22.04 as builder
55

66
ARG tag=main
77
ARG github=hyperledger/besu
88

9-
RUN echo "Cloning: $github - $tag" && \
10-
apt-get update && apt-get install -y git libsodium-dev libnss3-dev \
9+
RUN echo "installing java on ubuntu base image" \
10+
&& apt-get update && apt-get install -y git libsodium-dev libnss3-dev \
11+
&& apt-get install --no-install-recommends -q --assume-yes ca-certificates-java=20190909 \
12+
&& apt-get install --no-install-recommends -q --assume-yes openjdk-17-jre-headless=17* libjemalloc-dev=5.* \
13+
&& echo "Cloning: $github - $tag" \
1114
&& git clone --depth 1 --branch $tag https://github.com/$github \
1215
&& cd besu && ./gradlew installDist
1316

1417
## Final stage: Sets up the environment for running besu
15-
FROM openjdk:17-jdk-slim
18+
FROM ubuntu:22.04
1619

1720
# Copy compiled binary from builder
1821
COPY --from=builder /besu/build/install/besu /opt/besu
1922

2023
RUN apt-get update && apt-get install -y curl jq libsodium23 libnss3-dev \
21-
&& apt-get clean && rm -rf /var/lib/apt/lists/*
24+
&& apt-get install --no-install-recommends -q --assume-yes openjdk-17-jre-headless=17* libjemalloc-dev=5.* \
25+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
2226

2327
# Create version.txt
2428
RUN /opt/besu/bin/besu --version > /version.txt

clients/besu/Dockerfile.local

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
### Build Besu Locally:
22

33
## Builder stage: Compiles besu from a local directory
4-
FROM openjdk:17-jdk-slim as builder
4+
FROM ubuntu:22.04 as builder
55

66
# Default local client path: clients/besu/<besu>
77
ARG local_path=besu
88
COPY $local_path besu
99

1010
RUN apt-get update && apt-get install -y git libsodium-dev libnss3-dev \
11+
&& apt-get install --no-install-recommends -q --assume-yes ca-certificates-java=20190909 \
12+
&& apt-get install --no-install-recommends -q --assume-yes openjdk-17-jre-headless=17* libjemalloc-dev=5.* \
1113
&& cd besu && ./gradlew installDist
1214

1315
## Final stage: Sets up the environment for running besu
14-
FROM openjdk:17-jdk-slim
16+
FROM ubuntu:22.04
1517

1618
# Copy compiled binary from builder
1719
COPY --from=builder /besu/build/install/besu /opt/besu
1820

1921
RUN apt-get update && apt-get install -y curl jq libsodium23 libnss3-dev \
22+
&& apt-get install --no-install-recommends -q --assume-yes ca-certificates-java=20190909 \
23+
&& apt-get install --no-install-recommends -q --assume-yes openjdk-17-jre-headless=17* libjemalloc-dev=5.* \
2024
&& apt-get clean && rm -rf /var/lib/apt/lists/*
2125

2226
# Create version.txt

0 commit comments

Comments
 (0)