forked from IntersectMBO/cardano-db-sync
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.smash
102 lines (102 loc) · 25.1 KB
/
Dockerfile.smash
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
FROM debian:stable-slim as build
RUN apt-get update -y && apt-get install -y \
automake \
build-essential \
g++ \
git \
jq \
libffi-dev \
libghc-postgresql-libpq-dev \
libgmp-dev \
libncursesw5 \
libpq-dev \
libssl-dev \
libsystemd-dev \
libtinfo-dev \
libtool\
make\
pkg-config \
tmux \
wget \
zlib1g-dev \
autoconf \
libicu-dev \
gawk \
libghc-text-icu-dev \
curl
ENV PATH="/root/.cabal/bin:/root/.ghcup/bin:/root/.local/bin:$PATH"
ENV LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
RUN ldconfig
RUN wget https://downloads.haskell.org/~cabal/cabal-install-3.10.1.0/cabal-install-3.10.1.0-x86_64-linux-ubuntu20_04.tar.xz \
&& tar -xf cabal-install-3.10.1.0-x86_64-linux-ubuntu20_04.tar.xz \
&& rm cabal-install-3.10.1.0-x86_64-linux-ubuntu20_04.tar.xz \
&& mkdir -p ~/.local/bin \
&& mv cabal ~/.local/bin/ \
&& cabal update && cabal --version
RUN wget https://downloads.haskell.org/ghc/8.10.7/ghc-8.10.7-x86_64-deb9-linux.tar.xz \
&& tar -xf ghc-8.10.7-x86_64-deb9-linux.tar.xz \
&& rm ghc-8.10.7-x86_64-deb9-linux.tar.xz \
&& cd ghc-8.10.7 \
&& ./configure \
&& make install \
&& cd / \
&& rm -rf /ghc-8.10.7
RUN git clone https://github.com/supranational/blst && cd blst && git checkout v0.3.10 && ./build.sh && echo cHJlZml4PS91c3IKZXhlY19wcmVmaXg9JHtwcmVmaXh9CmxpYmRpcj0ke2V4ZWNfcHJlZml4fS9saWIKaW5jbHVkZWRpcj0ke3ByZWZpeH0vaW5jbHVkZQoKTmFtZTogbGliYmxzdApEZXNjcmlwdGlvbjogTXVsdGlsaW5ndWFsIEJMUzEyLTM4MSBzaWduYXR1cmUgbGlicmFyeQpVUkw6IGh0dHBzOi8vZ2l0aHViLmNvbS9zdXByYW5hdGlvbmFsL2Jsc3QKVmVyc2lvbjogMC4zLjEwCkNmbGFnczogLUkke2luY2x1ZGVkaXJ9CkxpYnM6IC1MJHtsaWJkaXJ9IC1sYmxzdA== | base64 --decode >> libblst.pc && cp libblst.pc /usr/lib/pkgconfig/ && cp bindings/blst_aux.h bindings/blst.h bindings/blst.hpp /usr/include/ && cp libblst.a /usr/lib && chmod u=rw,go=r /usr/lib/libblst.a && chmod u=rw,go=r /usr/lib/pkgconfig/libblst.pc && chmod u=rw,go=r /usr/include/blst.h && chmod u=rw,go=r /usr/include/blst.hpp && chmod u=rw,go=r /usr/include/blst_aux.h
RUN groupadd -g 1001 cardano
RUN useradd -rm -d /home/cardano -s /bin/bash -g 1001 -G sudo -u 1001 cardano
RUN mkdir /home/cardano/cdbsync
RUN mkdir /home/cardano/ipc
RUN mkdir /home/cardano/cardano-db-sync
RUN git clone https://github.com/input-output-hk/libsodium && cd libsodium && git checkout $(curl -L https://github.com/input-output-hk/iohk-nix/releases/latest/download/INFO | awk '$1 == "debian.libsodium-vrf.deb" { rev = gensub(/.*-(.*)\.deb/, "\\1", "g", $2); print rev }') && ./autogen.sh && ./configure && make && make check && make install
RUN mkdir secp256k1-sources && cd secp256k1-sources && git clone https://github.com/bitcoin-core/secp256k1.git && cd secp256k1 && git checkout $(curl -L https://github.com/input-output-hk/iohk-nix/releases/latest/download/INFO | awk '$1 == "debian.libsecp256k1.deb" { rev = gensub(/.*-(.*)\.deb/, "\\1", "g", $2); print rev }') && ./autogen.sh && ./configure --prefix=/usr --enable-module-schnorrsig --enable-experimental && make && make check && make install
ENV LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" \
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
ARG VERSION
RUN echo "Building tags/$VERSION..."
RUN cd /home/cardano/cardano-db-sync \
&& touch cabal.project.local \
&& echo "with-compiler: ghc-8.10.7" >> cabal.project.local \
&& cabal update
RUN cd cardano-db-sync \
&& cabal build all
RUN cp -p cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.10.7/cardano-smash-server-*/build/cardano-smash-server/cardano-smash-server /root/.local/bin/
RUN cp -p cardano-db-sync/dist-newstyle/build/x86_64-linux/ghc-8.10.7/cardano-db-sync-*/build/cardano-db-sync/cardano-db-sync /root/.local/bin/
FROM debian:stable-slim
ENV LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
RUN ldconfig
COPY --from=build /root/.local/bin/ /bin/
COPY --from=build /usr/local/lib/ /lib/
RUN apt-get update && apt-get install git postgresql libpq-dev libghc-postgresql-libpq-dev -y
RUN git clone https://github.com/supranational/blst && cd blst && git checkout v0.3.10 && ./build.sh && echo cHJlZml4PS91c3IKZXhlY19wcmVmaXg9JHtwcmVmaXh9CmxpYmRpcj0ke2V4ZWNfcHJlZml4fS9saWIKaW5jbHVkZWRpcj0ke3ByZWZpeH0vaW5jbHVkZQoKTmFtZTogbGliYmxzdApEZXNjcmlwdGlvbjogTXVsdGlsaW5ndWFsIEJMUzEyLTM4MSBzaWduYXR1cmUgbGlicmFyeQpVUkw6IGh0dHBzOi8vZ2l0aHViLmNvbS9zdXByYW5hdGlvbmFsL2Jsc3QKVmVyc2lvbjogMC4zLjEwCkNmbGFnczogLUkke2luY2x1ZGVkaXJ9CkxpYnM6IC1MJHtsaWJkaXJ9IC1sYmxzdA== | base64 --decode >> libblst.pc && cp libblst.pc /usr/lib/pkgconfig/ && cp bindings/blst_aux.h bindings/blst.h bindings/blst.hpp /usr/include/ && cp libblst.a /usr/lib && chmod u=rw,go=r /usr/lib/libblst.a && chmod u=rw,go=r /usr/lib/pkgconfig/libblst.pc && chmod u=rw,go=r /usr/include/blst.h && chmod u=rw,go=r /usr/include/blst.hpp && chmod u=rw,go=r /usr/include/blst_aux.h
ARG VERSION
RUN mkdir /home/cardano
RUN cd /home/cardano \
&& git clone https://github.com/input-output-hk/cardano-db-sync.git
ARG NODE_VERSION
RUN cd /home/cardano \
&& git clone https://github.com/input-output-hk/cardano-node.git
RUN apt-get install -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 libsqlite3-dev m4 ca-certificates gcc libc6-dev curl gawk
RUN git clone https://github.com/input-output-hk/libsodium && cd libsodium && git checkout $(curl -L https://github.com/input-output-hk/iohk-nix/releases/latest/download/INFO | awk '$1 == "debian.libsodium-vrf.deb" { rev = gensub(/.*-(.*)\.deb/, "\\1", "g", $2); print rev }') && ./autogen.sh && ./configure && make && make check && make install
RUN mkdir secp256k1-sources && cd secp256k1-sources && git clone https://github.com/bitcoin-core/secp256k1.git && cd secp256k1 && git checkout $(curl -L https://github.com/input-output-hk/iohk-nix/releases/latest/download/INFO | awk '$1 == "debian.libsecp256k1.deb" { rev = gensub(/.*-(.*)\.deb/, "\\1", "g", $2); print rev }') && ./autogen.sh && ./configure --prefix=/usr --enable-module-schnorrsig --enable-experimental && make && make check && make install
#BASE64 ENCODED DIRTY SOLUTION TO IMPLEMENT A QUICK BASH SCRIPT TO READ THE CONF FILE
RUN cd /home/cardano && echo aWYgWyAkTkVUV09SSyA9ICJtYWlubmV0IiBdOyB0aGVuIApleHBvcnQgQ09ORj0iLi9jYXJkYW5vLWRiLXN5bmMvY29uZmlnL21haW5uZXQueWFtbCI7IApmaTsgCmlmIFsgJE5FVFdPUksgPSAicHJlcHJvZCIgXTsgdGhlbiAKZXhwb3J0IENPTkY9Ii4vY2FyZGFuby1kYi1zeW5jL2NvbmZpZy9wcmVwcm9kLnlhbWwiOyAKZmk7CmlmIFsgJE5FVFdPUksgPSAicHJldmlldyIgXTsgdGhlbiAKZXhwb3J0IENPTkY9Ii4vY2FyZGFuby1kYi1zeW5jL2NvbmZpZy9wcmV2aWV3LnlhbWwiOyAKZmk7CmlmIFsgJE5FVFdPUksgPSAic2FuY2hvbmV0IiBdOyB0aGVuIApleHBvcnQgQ09ORj0iLi9jYXJkYW5vLWRiLXN5bmMvY29uZmlnL3NhbmNob25ldC55YW1sIjsgCmZpOwoKCg== | base64 --decode > getConf.sh && chmod +x getConf.sh
RUN git clone https://github.com/input-output-hk/cardano-configurations.git /cardano-configurations
#BASE64 ENCODED DIRTY SOLUTION TO IMPLEMENT A QUICK CONFIG YAML FILE INTO CARDANO DB SYNC
RUN echo IyBFeHBsb3JlciBEQiBOb2RlIGNvbmZpZ3VyYXRpb24KCk5ldHdvcmtOYW1lOiBtYWlubmV0CgpFbmFibGVMb2dNZXRyaWNzOiBGYWxzZQpFbmFibGVMb2dnaW5nOiBUcnVlCgpQcm90b2NvbDogQ2FyZGFubwoKIyBUaGUgY29uZmlnIGZpbGUgZm9yIHRoZSBub2RlIHdlIGFyZSBjb25uZWN0aW5nIHRvLiBJZiB0aGlzIGlzIG5vdCB0aGUgY29ycmVjdAojIGNvbmZpZywgaXQgd2lsbCBsaWtlbHkgbGVhZCB0byBkYi1zeW5jIHRocm93aW5nIHVwIHdlaXJkIGVycm9yIG1lc3NhZ2VzIGZyb20KIyB0aGUgY29uc2Vuc3VzIGxheWVyLgojIFRoZSBwYXRoIHRvIHRoZSBub2RlIGNvbmZpZyBmaWxlIGlzIHJlbGF0aXZlIHRvIHRoaXMgY29uZmlnIGZpbGUuCk5vZGVDb25maWdGaWxlOiAvY2FyZGFu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pZiBub3QgaW5kaWNhdGVkIG90aGVyd2lzZSwgdGhlbiBsb2cgb3V0cHV0IGlzIGRpcmVjdGVkIHRvIHRoaXM6CmRlZmF1bHRTY3JpYmVzOgogIC0gLSBTdGRvdXRTSwogICAgLSBzdGRvdXQKCiMgbW9yZSBvcHRpb25zIHdoaWNoIGNhbiBiZSBwYXNzZWQgYXMga2V5LXZhbHVlIHBhaXJzOgpvcHRpb25zOgogIGNmb2tleToKICAgIHZhbHVlOiAiUmVsZWFzZS0xLjAuMCIKICBtYXBTdWJ0cmFjZToKICAgIGJlbmNobWFyazoKICAgICAgY29udGVudHM6CiAgICAgICAgLSBHaGNSdHNTdGF0cwogICAgICAgIC0gTW9ub3RvbmljQ2xvY2sKICAgICAgc3VidHJhY2U6IE9ic2VydmFibGVUcmFjZQogICAgJyNla2d2aWV3JzoKICAgICAgY29udGVudHM6CiAgICAgIC0gLSB0YWc6IENvbnRhaW5zCiAgICAgICAgICBjb250ZW50czogJ2NhcmRhbm8uZXBvY2gtdmFsaWRhdGlvbi5iZW5jaG1hcmsnCiAgICAgICAgLSAtIHRhZzogQ29udGFpbnMKICAgICAgICAgICAgY29udGVudHM6IC5tb25vY2xvY2suYmFzaWMuCiAgICAgIC0gLSB0YWc6IENvbnRhaW5zCiAgICAgICAgICBjb250ZW50czogJ2NhcmRhbm8uZXBvY2gtdmFsaWRhdGlvbi5iZW5jaG1hcmsnCiAgICAgICAgLSAtIHRhZzogQ29udGFpbnMKICAgICAgICAgICAgY29udGVudHM6IGRpZmYuUlRTLmNwdU5zLnRpbWVkLgogICAgICAtIC0gdGFnOiBTdGFydHNXaXRoCiAgICAgICAgICBjb250ZW50czogJyNla2d2aWV3LiNhZ2dyZWdhdGlvbi5jYXJkYW5vLmVwb2NoLXZhbGlkYXRpb24uYmVuY2htYXJrJwogICAgICAgIC0gLSB0YWc6IENvbnRhaW5zCiAgICAgICAgICAgIGNvbnRlbnRzOiBkaWZmLlJUUy5nY051bS50aW1lZC4KICAgICA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pc2UsIHRoZW4gbG9nIG91dHB1dCBpcyBkaXJlY3RlZCB0byB0aGlzOgpkZWZhdWx0U2NyaWJlczoKICAtIC0gU3Rkb3V0U0sKICAgIC0gc3Rkb3V0CgojIG1vcmUgb3B0aW9ucyB3aGljaCBjYW4gYmUgcGFzc2VkIGFzIGtleS12YWx1ZSBwYWlyczoKb3B0aW9uczoKICBjZm9rZXk6CiAgICB2YWx1ZTogIlJlbGVhc2UtMS4wLjAiCiAgbWFwU3VidHJhY2U6CiAgICBiZW5jaG1hcms6CiAgICAgIGNvbnRlbnRzOgogICAgICAgIC0gR2hjUnRzU3RhdHMKICAgICAgICAtIE1vbm90b25pY0Nsb2NrCiAgICAgIHN1YnRyYWNlOiBPYnNlcnZhYmxlVHJhY2UKICAgICcjZWtndmlldyc6CiAgICAgIGNvbnRlbnRzOgogICAgICAtIC0gdGFnOiBDb250YWlucwogICAgICAgICAgY29udGVudHM6ICdjYXJkYW5vLmVwb2NoLXZhbGlkYXRpb24uYmVuY2htYXJrJwogICAgICAgIC0gLSB0YWc6IENvbnRhaW5zCiAgICAgICAgICAgIGNvbnRlbnRzOiAubW9ub2Nsb2NrLmJhc2ljLgogICAgICAtIC0gdGFnOiBDb250YWlucwogICAgICAgICAgY29udGVudHM6ICdjYXJkYW5vLmVwb2NoLXZhbGlkYXRpb24uYmVuY2htYXJrJwogICAgICAgIC0gLSB0YWc6IENvbnRhaW5zCiAgICAgICAgICAgIGNvbnRlbnRzOiBkaWZmLlJUUy5jcHVOcy50aW1lZC4KICAgICAgLSAtIHRhZzogU3RhcnRzV2l0aAogICAgICAgICAgY29udGVudHM6ICcjZWtndmlldy4jYWdncmVnYXRpb24uY2FyZGFuby5lcG9jaC12YWxpZGF0aW9uLmJlbmNobWFyaycKICAgICAgICAtIC0gdGFnOiBDb250YWlucwogICAgICAgICAgICBjb250ZW50czogZGlmZi5SVFMuZ2NOdW0udGltZWQuCiAgICAgIHN1YnRyYWNlOiBGaWx0ZXJUcmFjZQogICA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/home/cardano/entrypoint.sh
RUN chmod +x /home/cardano/entrypoint.sh
WORKDIR /home/cardano
RUN chown -R 1001:1001 /home/cardano
RUN chown -R 1001:1001 /home/cardano/cardano-db-sync
RUN chown -R 1001:1001 /home/cardano/secp256k1-sources
RUN chown -R 1001:1001 /cardano-configurations
RUN chown -R 1001:1001 /home/cardano/
RUN chown -R 1001:1001 /home/cardano/cdbsync
RUN touch /home/cardano/admins.txt
USER 1001:1001
ENTRYPOINT /home/cardano/entrypoint.sh