-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
40 lines (31 loc) · 1007 Bytes
/
Dockerfile
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
32
33
34
35
36
37
38
39
40
FROM golang:1.19.3 as build
ARG buildCommit
ARG gittag
ARG buildTime
ARG builder
ARG gover
WORKDIR /geth-indexer
COPY ./assets assets
COPY ./cmd cmd
COPY ./go.mod .
COPY ./go.sum .
COPY ./libs libs
COPY ./main.go .
COPY ./scripts scripts
COPY ./services services
COPY ./types types
COPY ./version version
COPY ./algorand algorand
RUN go build -ldflags="\
-X 'github.com/supragya/EtherScope/version.buildCommit=$buildCommit' \
-X 'github.com/supragya/EtherScope/version.gittag=$gittag' \
-X 'github.com/supragya/EtherScope/version.buildTime=$buildtime' \
-X 'github.com/supragya/EtherScope/version.builder=$builder' \
-X 'github.com/supragya/EtherScope/version.gover=$gover'" \
-o build/escope
# App did not start correctly in Alpine, but perhaps a solution for this could be found
FROM golang:1.19.3
WORKDIR /geth-indexer
COPY --from=build /geth-indexer/build/escope /geth-indexer/escope
RUN "printf \"%s\" \"$CONFIG\" > ./config.yaml"
CMD ["./escope", "realtime", "-c", "config.yaml"]