forked from levonpetrosyan93/firo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
86 lines (72 loc) · 2.06 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# This is a Dockerfile for firod.
FROM debian:stretch
# Install required system packages
RUN apt-get update && apt-get install -y \
automake \
bsdmainutils \
curl \
g++ \
libboost-all-dev \
libevent-dev \
libssl-dev \
libtool \
libzmq3-dev \
make \
openjdk-8-jdk \
pkg-config \
zlib1g-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
# Install minizip from source (unavailable from apt on Ubuntu 14.04)
RUN curl -L https://www.zlib.net/zlib-1.2.11.tar.gz | tar -xz -C /tmp && \
cd /tmp/zlib-1.2.11/contrib/minizip && \
autoreconf -fi && \
./configure --enable-shared=no --with-pic && \
make -j$(nproc) install && \
cd / && rm -rf /tmp/zlib-1.2.11
# Install zmq from source (outdated version from apt on Ubuntu 14.04)
RUN curl -L https://github.com/zeromq/libzmq/releases/download/v4.3.1/zeromq-4.3.1.tar.gz | tar -xz -C /tmp && \
cd /tmp/zeromq-4.3.1/ && ./configure --disable-shared --without-libsodium --with-pic && \
make -j$(nproc) install && \
cd / && rm -rf /tmp/zeromq-4.3.1/
# Create user to run daemon
RUN useradd -m -U firod
# Build Firo
COPY . /tmp/firo/
RUN cd /tmp/firo && \
./autogen.sh && \
./configure --without-gui --prefix=/usr && \
make -j$(nproc) && \
make check && \
make install && \
cd / && rm -rf /tmp/firo
# Remove unused packages
RUN apt-get remove -y \
automake \
bsdmainutils \
curl \
g++ \
libboost-all-dev \
libevent-dev \
libssl-dev \
libtool \
libzmq3-dev \
make
# Start Firo Daemon
USER firod
RUN mkdir /home/firod/.firo
VOLUME [ "/home/firod/.firo" ]
# Main network ports
EXPOSE 8168
EXPOSE 8888
# Test network ports
EXPOSE 18168
EXPOSE 18888
# Regression test network ports
EXPOSE 18444
EXPOSE 28888
ENTRYPOINT [ "/usr/bin/firod" ]