-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile
More file actions
80 lines (73 loc) · 2.58 KB
/
Copy pathDockerfile
File metadata and controls
80 lines (73 loc) · 2.58 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
FROM ghcr.io/blinklabs-io/go:1.26.3-1 AS build
ARG VERSION
ARG COMMIT_HASH
ENV VERSION=${VERSION}
ENV COMMIT_HASH=${COMMIT_HASH}
WORKDIR /code
RUN go env -w GOCACHE=/go-cache
RUN go env -w GOMODCACHE=/gomod-cache
COPY go.* .
RUN go mod download
COPY . .
RUN make build
FROM build AS antithesis-build
RUN go get github.com/antithesishq/antithesis-sdk-go@latest
RUN go install github.com/antithesishq/antithesis-sdk-go/tools/antithesis-go-instrumentor@latest
RUN make mod-tidy
RUN mkdir -p /antithesis
# Create instrumented code in /antithesis
RUN `go env GOPATH`/bin/antithesis-go-instrumentor /code /antithesis
WORKDIR /antithesis/customer
RUN make build
FROM ghcr.io/blinklabs-io/cardano-cli:11.0.0.0-1 AS cardano-cli
FROM ghcr.io/blinklabs-io/cardano-configs:20260707-2 AS cardano-configs
FROM ghcr.io/blinklabs-io/nview:0.15.0 AS nview
FROM ghcr.io/blinklabs-io/txtop:0.15.0 AS txtop
FROM debian:bookworm-slim AS dingo
RUN apt-get update -y && \
apt-get install -y \
ca-certificates \
liblmdb0 \
libssl3 \
sqlite3 \
wget && \
rm -rf /var/lib/apt/lists/*
ENV LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
COPY --from=build /code/dingo /bin/
COPY --from=cardano-cli /usr/local/bin/cardano-cli /usr/local/bin/
COPY --from=cardano-cli /usr/local/include/ /usr/local/include/
COPY --from=cardano-cli /usr/local/lib/ /usr/local/lib/
COPY --from=cardano-configs /config/ /opt/cardano/config/
COPY --from=nview /bin/nview /usr/local/bin/
COPY --from=txtop /bin/txtop /usr/local/bin/
COPY --chmod=0755 bin/entrypoint.sh /bin/entrypoint.sh
ENV CARDANO_NODE_BINARY=dingo
ENV CARDANO_NETWORK=preview
# Create database dir owned by container user
VOLUME /data/db
ENV CARDANO_DATABASE_PATH=/data/db
# Create socket dir owned by container user
VOLUME /ipc
ENV DINGO_SOCKET_PATH=/ipc/dingo.socket
ENV CARDANO_NODE_SOCKET_PATH=/ipc/dingo.socket
ENV CARDANO_SOCKET_PATH=/ipc/dingo.socket
EXPOSE 3001 3002 9090 12798
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
CMD wget -qO/dev/null http://127.0.0.1:12798/metrics || exit 1
RUN addgroup --system dingo && adduser --system --no-create-home --ingroup dingo dingo
RUN mkdir -p /data/db /ipc && chown -R dingo:dingo /data/db /ipc
USER dingo
ENTRYPOINT ["/bin/entrypoint.sh"]
CMD ["serve"]
FROM dingo AS antithesis
USER root
RUN apt-get update -y && \
apt-get install -y \
curl \
lsof \
netcat-openbsd \
socat
COPY --from=antithesis-build /antithesis/customer/dingo /bin/
COPY --from=antithesis-build /antithesis/symbols/*.sym.tsv /symbols/
FROM dingo AS final