-
Notifications
You must be signed in to change notification settings - Fork 49
/
Dockerfile
66 lines (54 loc) · 1.38 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
FROM debian:stretch
# Install required system packages
RUN apt-get update && apt-get install -y \
apt-utils \
automake \
g++ \
make \
libtool \
pkg-config \
doxygen \
libdb++-dev \
curl \
bsdmainutils \
libboost-all-dev \
libssl-dev \
libevent-dev
# Install Berkeley DB 4.8
RUN curl -L http://download.oracle.com/berkeley-db/db-4.8.30.tar.gz | tar -xz -C /tmp && \
cd /tmp/db-4.8.30/build_unix && \
../dist/configure --enable-cxx --includedir=/usr/include/bdb4.8 --libdir=/usr/lib && \
make -j$(nproc) && make install && \
cd / && rm -rf /tmp/db-4.8.30
RUN useradd -mU xsn
COPY . /tmp/xsncore/
RUN cd /tmp/xsncore && \
./autogen.sh && \
./configure --disable-tests --without-gui --prefix=/usr && \
make -j$(nproc) && \
make check && \
make install && \
cd / && rm -rf /tmp/xsncore
# Remove unused packages
RUN apt-get remove -y \
automake \
g++ \
make \
libtool \
pkg-config \
doxygen \
libdb++-dev \
curl \
bsdmainutils \
libboost-all-dev \
libssl-dev \
libevent-dev
USER xsn:xsn
RUN mkdir /home/xsn/.xsncore && \
touch /home/xsn/.xsncore/xsn.conf
VOLUME [ "/home/xsn/.xsncore" ]
EXPOSE 62583
EXPOSE 8332
EXPOSE 18332
ENTRYPOINT ["/usr/bin/xsnd", "--conf=/home/xsn/.xsncore/xsn.conf"]
HEALTHCHECK CMD curl --fail http://127.0.0.1:$DEFAULT_PORT/ || exit 1