-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (40 loc) · 2.24 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
FROM ubuntu:bionic
RUN apt-get update && apt-get install --no-install-recommends -y \
automake build-essential pkg-config libffi-dev libgmp-dev libssl-dev libtinfo-dev libsystemd-dev \
zlib1g-dev make g++ tmux git jq wget libncursesw5 libtool autoconf
RUN wget https://downloads.haskell.org/~cabal/cabal-install-3.2.0.0/cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz && \
tar -xf cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz && \
rm cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz cabal.sig && \
mv cabal /usr/local/bin/
RUN cabal update && cabal --version
RUN wget https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-deb9-linux.tar.xz && \
tar -xf ghc-8.6.5-x86_64-deb9-linux.tar.xz && \
rm ghc-8.6.5-x86_64-deb9-linux.tar.xz && \
cd ghc-8.6.5 && \
./configure && \
make install
RUN git clone https://github.com/input-output-hk/libsodium && \
cd libsodium && \
git checkout 66f017f1 && \
./autogen.sh && \
./configure && \
make && \
make install
ARG CARDANO_NODE_VERSION=1.18.0
RUN git clone https://github.com/input-output-hk/cardano-node.git && \
cd cardano-node && \
git fetch --all --tags && \
git tag && \
git checkout tags/${CARDANO_NODE_VERSION} &&\
cabal build all && \
cp -p dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-node-${CARDANO_NODE_VERSION}/x/cardano-node/build/cardano-node/cardano-node /usr/local/bin/ && \
cp -p dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-cli-${CARDANO_NODE_VERSION}/x/cardano-cli/build/cardano-cli/cardano-cli /usr/local/bin/ && \
cardano-cli --version
RUN mkdir -p /etc/cardano/conf && \
wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/mainnet-config.json && \
wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/mainnet-byron-genesis.json && \
wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/mainnet-shelley-genesis.json && \
wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/mainnet-topology.json && \
mv mainnet-*.json /etc/cardano/conf
RUN mkdir -p /etc/cardano/secrets
VOLUME /etc/cardano/secrets