File tree Expand file tree Collapse file tree 3 files changed +34
-3
lines changed Expand file tree Collapse file tree 3 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 17
17
flake. *
18
18
native /** /target /
19
19
Dockerfile
20
+ * .pb.ex
21
+ * .pb.go
Original file line number Diff line number Diff line change @@ -133,6 +133,20 @@ jobs:
133
133
- name : Run dialyzer
134
134
run : mix dialyzer --no-check
135
135
136
+ docker-build :
137
+ name : Build Docker image
138
+ runs-on : ubuntu-22.04
139
+ steps :
140
+ - uses : actions/checkout@v4
141
+ - name : Set up Docker Buildx
142
+ uses : docker/setup-buildx-action@v1
143
+ - name : Build Docker image
144
+ uses : docker/build-push-action@v2
145
+ with :
146
+ context : .
147
+ file : ./Dockerfile
148
+ load : true # Important for building without pushing
149
+
136
150
smoke :
137
151
name : Start and stop the node
138
152
needs : [compile-native, download-beacon-node-oapi]
Original file line number Diff line number Diff line change 2
2
FROM golang:1.21.3 AS libp2p_builder
3
3
LABEL stage=builder
4
4
5
+ # Install dependencies
6
+ RUN apt-get update && apt-get install -y protobuf-compiler
7
+ RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
8
+
5
9
RUN mkdir /libp2p_port
6
10
WORKDIR /libp2p_port
7
11
8
12
COPY native/libp2p_port /libp2p_port
13
+ COPY proto/libp2p.proto /libp2p_port/proto/libp2p.proto
9
14
10
- RUN go build -o libp2p_port
15
+ RUN protoc --go_out=./ proto/libp2p.proto
11
16
17
+ RUN go mod download
18
+ RUN go build -o libp2p_port
12
19
13
20
# Main image
14
21
FROM elixir:1.16.2-otp-26
@@ -21,15 +28,23 @@ ENV MIX_ENV=prod
21
28
RUN mix local.hex --force
22
29
23
30
# Install dependencies
24
- RUN apt-get update && apt-get install -y cmake
31
+ RUN apt-get update && apt-get install -y cmake protobuf-compiler
32
+
33
+ # Install protobuf for elixir
34
+ RUN mix escript.install --force hex protobuf
25
35
26
36
# Install rust
27
37
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
28
- ENV PATH="${PATH}:/root/.cargo/bin"
38
+
39
+ ENV PATH="${PATH}:/root/.cargo/bin:/root/.mix/escripts"
29
40
30
41
COPY . .
31
42
COPY --from=libp2p_builder /libp2p_port/libp2p_port /consensus/priv/native/libp2p_port
32
43
44
+ RUN protoc --elixir_out=./lib proto/libp2p.proto
45
+
46
+ RUN make download-beacon-node-oapi
47
+
33
48
RUN mix deps.get
34
49
RUN mix compile
35
50
You can’t perform that action at this time.
0 commit comments