-
Notifications
You must be signed in to change notification settings - Fork 82
/
Dockerfile
64 lines (46 loc) · 1.41 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM golang:1.21.1-alpine3.18 as builder
RUN apk add --no-cache gcc git make musl-dev
COPY ./go.mod /app/go.mod
COPY ./go.sum /app/go.sum
COPY ./Makefile /app/Makefile
COPY ./op-batcher /app/op-batcher
COPY ./op-bindings /app/op-bindings
COPY ./op-chain-ops /app/op-chain-ops
COPY ./op-node /app/op-node
COPY ./op-service /app/op-service
COPY ./op-plasma /app/op-plasma
COPY ./op-conductor /app/op-conductor
COPY ./kroma-bindings /app/kroma-bindings
COPY ./kroma-chain-ops /app/kroma-chain-ops
COPY ./kroma-validator /app/kroma-validator
COPY ./.git /app/.git
WORKDIR /app
RUN make build
FROM alpine:3.18 as runner
RUN addgroup user && \
adduser -G user -s /bin/sh -h /home/user -D user
USER user
WORKDIR /home/user/
FROM alpine:3.18 as runner-with-kroma-log
RUN addgroup user && \
adduser -G user -s /bin/sh -h /home/user -D user
RUN mkdir /kroma_log/ && \
chown user:user /kroma_log
USER user
WORKDIR /home/user/
# Node
FROM runner-with-kroma-log as op-node
COPY --from=builder /app/bin/op-node /usr/local/bin
ENTRYPOINT ["op-node"]
# Stateviz
FROM runner-with-kroma-log as op-stateviz
COPY --from=builder /app/bin/op-stateviz /usr/local/bin
CMD ["op-stateviz"]
# Batcher
FROM runner as op-batcher
COPY --from=builder /app/bin/op-batcher /usr/local/bin
ENTRYPOINT ["op-batcher"]
# Validator
FROM runner as kroma-validator
COPY --from=builder /app/bin/kroma-validator /usr/local/bin
ENTRYPOINT ["kroma-validator"]