File tree 5 files changed +52
-53
lines changed
5 files changed +52
-53
lines changed Original file line number Diff line number Diff line change 43
43
uses : docker/build-push-action@v2
44
44
with :
45
45
context : .
46
- file : ./build/dockerfiles/beacon-chain_file.Dockerfile
46
+ file : ./build/dockerfiles/Dockerfile
47
+ target : beacon-chain
47
48
cache-from : type=gha
48
49
cache-to : type=gha,mode=max
49
50
platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change 43
43
uses : docker/build-push-action@v2
44
44
with :
45
45
context : .
46
- file : ./build/dockerfiles/validator_file.Dockerfile
46
+ file : ./build/dockerfiles/Dockerfile
47
+ target : validator
47
48
cache-from : type=gha
48
49
cache-to : type=gha,mode=max
49
50
platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change
1
+ # Build Geth in a stock Go builder container
2
+ FROM --platform=${BUILDPLATFORM} golang:1.21 as builder
3
+
4
+ RUN apt-get update && apt-get install -y \
5
+ gcc \
6
+ g++ \
7
+ libstdc++6 \
8
+ libc-dev \
9
+ musl-tools
10
+
11
+ # Get dependencies - will also be cached if we won't change go.mod/go.sum
12
+ COPY go.mod /prysm/
13
+ COPY go.sum /prysm/
14
+ RUN cd /prysm && go mod download
15
+
16
+ ADD . /prysm
17
+
18
+ FROM builder AS build-beacon-chain
19
+ ARG TARGETOS
20
+ ARG TARGETARCH
21
+ RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
22
+ cd /prysm/cmd/beacon-chain && CGO_ENABLED=1 go build -v -o /usr/local/bin/beacon-chain
23
+
24
+ FROM builder AS build-validator
25
+ ARG TARGETOS
26
+ ARG TARGETARCH
27
+ RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
28
+ cd /prysm/cmd/validator && CGO_ENABLED=1 go build -v -o /usr/local/bin/validator
29
+
30
+ FROM builder AS build-prysmctl
31
+ ARG TARGETOS
32
+ ARG TARGETARCH
33
+ RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
34
+ cd /prysm/cmd/prysmctl && CGO_ENABLED=1 go build -v -o /usr/local/bin/prysmctl
35
+
36
+ # Pull Geth into a second stage deploy container
37
+ FROM debian:latest AS beacon-chain
38
+ COPY --from=build-beacon-chain /usr/local/bin/beacon-chain /usr/local/bin/
39
+ EXPOSE 4000 3500 8080 6060 9090
40
+ ENTRYPOINT ["beacon-chain" ]
41
+
42
+ FROM debian:latest AS validator
43
+ COPY --from=build-validator /usr/local/bin/validator /usr/local/bin/
44
+ ENTRYPOINT ["validator" ]
45
+
46
+ FROM debian:latest AS prysmctl
47
+ COPY --from=build-prysmctl /usr/local/bin/prysmctl /usr/local/bin/
48
+ ENTRYPOINT ["prysmctl" ]
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments