-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.Dockerfile
71 lines (63 loc) · 1.93 KB
/
build.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
69
70
71
ARG UBUNTU_VERSION=20.04
FROM ubuntu:${UBUNTU_VERSION}
ENV DEBIAN_FRONTEND=nonintercative
# development dependencies
RUN apt-get update -y && apt-get install -y \
automake \
build-essential \
g++\
git \
jq \
libicu-dev \
libffi-dev \
libgmp-dev \
liblzma-dev \
libncursesw5 \
libpq-dev \
libssl-dev \
libsystemd-dev \
libtinfo-dev \
libtool \
make \
pkg-config \
tmux \
wget \
zlib1g-dev libreadline-dev llvm libnuma-dev \
&& rm -rf /var/lib/apt/lists/*
ARG CABAL_VERSION=3.6.2.0
ARG GHC_VERSION=8.10.7
ARG IOHK_LIBSODIUM_GIT_REV=66f017f16633f2060db25e17c170c2afa0f2a8a1
ARG IOKH_LIBSECP251_GIT_REV=ac83be33d0956faf6b7f61a60ab524ef7d6a473a
# install secp2561k library with prefix '/'
RUN git clone https://github.com/bitcoin-core/secp256k1 &&\
cd secp256k1 \
&& git fetch --all --tags &&\
git checkout ${IOKH_LIBSECP251_GIT_REV} \
&& ./autogen.sh && \
./configure --prefix=/usr --enable-module-schnorrsig --enable-experimental && \
make && \
make install && cd .. && rm -rf ./secp256k1
# install libsodium from sources with prefix '/'
RUN git clone https://github.com/input-output-hk/libsodium.git &&\
cd libsodium \
&& git fetch --all --tags &&\
git checkout ${IOHK_LIBSODIUM_GIT_REV} \
&& ./autogen.sh && \
./configure --prefix=/usr && \
make && \
make install && cd .. && rm -rf ./libsodium
# install cabal
RUN wget --secure-protocol=TLSv1_2 \
"https://downloads.haskell.org/~cabal/cabal-install-${CABAL_VERSION}/cabal-install-${CABAL_VERSION}-$(arch)-linux-deb10.tar.xz" && \
tar -xf *.tar.xz &&\
rm *.tar.xz &&\
mv cabal /usr/local/bin/
# install ghc from sources
WORKDIR /app/ghc
RUN wget --secure-protocol=TLSv1_2 \
"https://downloads.haskell.org/~ghc/${GHC_VERSION}/ghc-${GHC_VERSION}-$(arch)-deb10-linux.tar.xz" &&\
tar -xf *.tar.xz &&\
rm *.tar.xz \
&& cd /app/ghc/ghc-${GHC_VERSION} \
&& ./configure && make install \
&& cd .. && rm -rf /app/ghc/ghc-${GHC_VERSION}