forked from kryptokrona/kryptokrona
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.test
78 lines (64 loc) · 2.04 KB
/
Dockerfile.test
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
# this docker file can be used for both a daemon, miner and a wallet if needed
# we only have to set specific command or entrypoint inside the docker compose
# file to customize the behavior of the container when started.
# step 1: build the binary
FROM ubuntu:22.04 as builder
COPY . /usr/src/kryptokrona
WORKDIR /usr/src/kryptokrona
RUN chmod +x ./scripts/testnet/wait-for-it.sh ./scripts/testnet/docker-entrypoint.sh
# install build dependencies
RUN apt-get update && \
apt-get install -y \
build-essential \
libssl-dev \
libffi-dev \
python3-dev \
gcc-11 \
g++-11 \
git \
cmake \
librocksdb-dev \
libboost-all-dev \
libboost-system1.74.0 \
libboost-filesystem1.74.0 \
libboost-thread1.74.0 \
libboost-date-time1.74.0 \
libboost-chrono1.74.0 \
libboost-regex1.74.0 \
libboost-serialization1.74.0 \
libboost-program-options1.74.0 \
libicu70 \
cron \
rpcbind
# Install Python and pip
RUN apt-get install -y python3-pip
# Install pexpect library
RUN pip3 install pexpect
# create the build directory
RUN mkdir build
WORKDIR /usr/src/kryptokrona/build
# build and install
RUN cmake -DCMAKE_CXX_FLAGS="-g0 -Os -fPIC -std=gnu++17" -DTEST_NET=ON .. && make
# step 2: create the final image
FROM ubuntu:22.04
WORKDIR /usr/src/kryptokrona
COPY --from=builder /usr/src/kryptokrona/start.sh .
COPY --from=builder /usr/src/kryptokrona/build/src/kryptokronad .
COPY --from=builder /usr/src/kryptokrona/build/src/xkrwallet .
COPY --from=builder /usr/src/kryptokrona/build/src/miner .
COPY --from=builder /usr/src/kryptokrona/build/src/kryptokrona-service .
COPY --from=builder /usr/src/kryptokrona/build/src/wallet-api .
COPY --from=builder /usr/src/kryptokrona/scripts/walletapi_docker_wrapper.py .
# set executable permissions
RUN chmod +x start.sh
RUN chmod +x kryptokronad
RUN chmod +x xkrwallet
RUN chmod +x miner
RUN chmod +x kryptokrona-service
RUN chmod +x wallet-api
EXPOSE 5000
EXPOSE 8070
EXPOSE 11897
EXPOSE 11898
# create the directory for the daemon files
RUN mkdir -p src/blockloc