-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
67 lines (55 loc) · 1.53 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
# Use Ubuntu 20.04 LTS as the base image
FROM ubuntu:20.04
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV PATH="/root/.ghcup/bin:${PATH}"
# Install necessary packages
RUN apt-get update && apt-get install -y \
curl \
git \
autoconf \
autogen \
automake \
libtool \
pkg-config \
qtdeclarative5-dev \
libqt5quick5 \
qt5-image-formats-plugins \
qttools5-dev-tools \
qtbase5-dev \
wget \
sudo \
build-essential \
libgmp-dev \
libffi-dev \
libncurses5-dev \
flatpak \
flatpak-builder \
&& rm -rf /var/lib/apt/lists/*
# Install GHCup
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
# Install specific versions of GHC and Cabal
RUN ghcup install ghc 9.6.6 && ghcup set ghc 9.6.6
RUN ghcup install cabal 3.10.3.0 && ghcup set cabal 3.10.3.0
# Install secp256k1 library
RUN git clone https://github.com/bitcoin-core/secp256k1 && \
cd secp256k1 && \
git checkout v0.5.1 && \
./autogen.sh && \
./configure --enable-module-schnorrsig --enable-module-extrakeys --enable-module-ecdh --enable-experimental --enable-module-recovery && \
make && \
make install && \
cd .. && \
rm -rf secp256k1
# Set library path
RUN echo "/usr/local/lib" | tee /etc/ld.so.conf.d/local.conf && ldconfig
# Set working directory
WORKDIR /app
# Copy project files
COPY . .
# Make the entrypoint script executable
RUN chmod +x entrypoint.sh
# Set the entrypoint
ENTRYPOINT ["./entrypoint.sh"]
# Default command
CMD ["shell"]