-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (24 loc) · 823 Bytes
/
Dockerfile
File metadata and controls
28 lines (24 loc) · 823 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
FROM golang:1.21-alpine3.17 as goDependencies
COPY ./src/go.mod /deps/go.mod
COPY ./src/go.sum /deps/go.sum
WORKDIR /deps
RUN go mod download
FROM ghcr.io/foundry-rs/foundry:latest as contracts
COPY gnosh-contracts /deps/gnosh-contracts
COPY .git /deps/.git
COPY src/Makefile /deps/src/Makefile
WORKDIR /deps/src
RUN apk add --no-cache make
RUN make compile-contracts
FROM golang:1.21-alpine3.17 as appBuilder
RUN apk add --no-cache gcc g++ musl-dev
COPY src /src
COPY --from=contracts /deps/gnosh-contracts/out /gnosh-contracts/out
COPY --from=goDependencies /go /go
RUN apk add --no-cache make
WORKDIR /src
RUN mkdir /abis
RUN CGO_ENABLED=1 GOOS=linux make build
FROM golang:1.21-alpine3.17
COPY --from=appBuilder /src/bin/encrypting-rpc-server /bin/encrypting-rpc-server
ENTRYPOINT ["encrypting-rpc-server", "start"]