-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
68 lines (66 loc) · 2.49 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
65
66
67
68
FROM ghcr.io/blinklabs-io/haskell:9.6.4-3.10.2.0-1 AS cardano-node-build
# Install cardano-node
ARG NODE_VERSION=10.1.3
ENV NODE_VERSION=${NODE_VERSION}
RUN echo "Building tags/${NODE_VERSION}..." \
&& echo tags/${NODE_VERSION} > /CARDANO_BRANCH \
&& git clone https://github.com/input-output-hk/cardano-node.git \
&& cd cardano-node \
&& git fetch --all --recurse-submodules --tags \
&& git tag \
&& git checkout tags/${NODE_VERSION} \
&& echo "with-compiler: ghc-${GHC_VERSION}" >> cabal.project.local \
&& echo "tests: False" >> cabal.project.local \
&& cabal update \
&& cabal build all \
&& mkdir -p /root/.local/bin/ \
&& cp -p "$(./scripts/bin-path.sh cardano-node)" /root/.local/bin/ \
&& rm -rf /root/.cabal/packages \
&& rm -rf /usr/local/lib/ghc-${GHC_VERSION}/ /usr/local/share/doc/ghc-${GHC_VERSION}/ \
&& rm -rf /code/cardano-node/dist-newstyle/ \
&& rm -rf /root/.cabal/store/ghc-${GHC_VERSION}
FROM ghcr.io/blinklabs-io/cardano-cli:10.1.1.0-1 AS cardano-cli
FROM ghcr.io/blinklabs-io/cardano-configs:20241028-1 AS cardano-configs
FROM ghcr.io/blinklabs-io/mithril-client:0.10.5-1 AS mithril-client
FROM ghcr.io/blinklabs-io/mithril-signer:0.2.221-1 AS mithril-signer
FROM ghcr.io/blinklabs-io/nview:0.10.3 AS nview
FROM ghcr.io/blinklabs-io/txtop:0.12.0 AS txtop
FROM debian:bookworm-slim AS cardano-node
ENV LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
COPY --from=cardano-node-build /usr/local/lib/ /usr/local/lib/
COPY --from=cardano-node-build /usr/local/include/ /usr/local/include/
COPY --from=cardano-node-build /root/.local/bin/cardano-* /usr/local/bin/
COPY --from=cardano-configs /config/ /opt/cardano/config/
COPY --from=cardano-cli /usr/local/bin/cardano-cli /usr/local/bin/
COPY --from=mithril-client /bin/mithril-client /usr/local/bin/
COPY --from=mithril-signer /bin/mithril-signer /usr/local/bin/
COPY --from=nview /bin/nview /usr/local/bin/
COPY --from=txtop /bin/txtop /usr/local/bin/
COPY bin/ /usr/local/bin/
RUN apt-get update -y && \
apt-get install -y \
bc \
curl \
iproute2 \
jq \
libffi8 \
libgmp10 \
liblmdb0 \
libncursesw5 \
libnuma1 \
libsystemd0 \
libssl3 \
libtinfo6 \
llvm-14-runtime \
netbase \
pkg-config \
procps \
socat \
sqlite3 \
wget \
zlib1g && \
rm -rf /var/lib/apt/lists/* && \
chmod +x /usr/local/bin/*
EXPOSE 3001 12788 12798
ENTRYPOINT ["/usr/local/bin/entrypoint"]