-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathDockerfile.alltools
More file actions
32 lines (23 loc) · 864 Bytes
/
Dockerfile.alltools
File metadata and controls
32 lines (23 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Build Geth in a stock Go builder container
FROM golang:1.19-bookworm as builder
RUN headers_package="linux-headers-$(dpkg --print-architecture)" && \
apt update && \
apt install -y build-essential git musl-dev $headers_package
ADD . /go-ethereum
RUN cd /go-ethereum && make all-musl
# Pull all binaries into a second stage deploy alpine container
FROM debian:bookworm
ARG COMMIT_SHA
RUN apt update &&\
apt install -y ca-certificates wget curl &&\
rm -rf /var/cache/apt &&\
rm -rf /var/lib/apt/lists/* &&\
ln -sf /bin/bash /bin/sh
COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/
RUN echo $COMMIT_SHA > /version.txt
EXPOSE 8545 8546 30303 30303/udp
# Add some metadata labels to help programatic image consumption
ARG COMMIT=""
ARG VERSION=""
ARG BUILDNUM=""
LABEL commit="$COMMIT" version="$VERSION" buildnum="$BUILDNUM"