forked from diva-exchange/i2p
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
70 lines (66 loc) · 1.92 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
FROM alpine:latest
LABEL author="Konrad Baechler <[email protected]>" \
maintainer="Konrad Baechler <[email protected]>" \
name="diva-i2p" \
description="Distributed digital value exchange upholding security, reliability and privacy" \
url="https://diva.exchange"
COPY conf/ /home/i2pd/conf/
COPY network/ /home/i2pd/network/
COPY certificates/ /home/i2pd/data/certificates/
COPY entrypoint.sh /
# install deps && build i2p binary
RUN mkdir -p /home/i2pd/data/addressbook \
&& mkdir /home/i2pd/tunnels.null \
&& mkdir /home/i2pd/tunnels.source.conf.d \
&& mkdir /home/i2pd/tunnels.conf.d \
&& mkdir /home/i2pd/bin \
&& apk --no-cache --virtual build-dependendencies add \
cmake \
make \
gcc \
g++ \
binutils \
libtool \
libev-dev \
check-dev \
zlib-dev \
boost-dev \
build-base \
openssl-dev \
openssl \
git \
autoconf \
automake \
&& cd /tmp \
&& git clone -b openssl https://github.com/PurpleI2P/i2pd.git \
&& cd /tmp/i2pd/build \
&& cmake -DWITH_AESNI=ON . \
&& make \
&& strip i2pd \
&& mv /tmp/i2pd/build/i2pd /home/i2pd/bin/i2pd \
&& mv /tmp/i2pd/LICENSE /home/i2pd/LICENSE \
&& mv /tmp/i2pd/ChangeLog /home/i2pd/ChangeLog \
# clean up /tmp
&& cd /home/i2pd \
&& rm -rf /tmp/i2pd \
# remove build dependencies
&& apk --no-cache --purge del build-dependendencies \
# i2p runtime dependencies
&& apk --no-cache add \
boost-filesystem \
boost-system \
boost-program_options \
boost-date_time \
openssl \
musl-utils \
libstdc++ \
sed \
&& cp /home/i2pd/conf/addresses-initial.org.csv /home/i2pd/data/addressbook/addresses.csv \
&& addgroup -g 1000 i2pd \
&& adduser -u 1000 -G i2pd -s /bin/sh -h "/home/i2pd" -D i2pd \
&& chown -R i2pd:i2pd /home/i2pd \
&& chmod 0700 /home/i2pd/bin/i2pd \
&& chmod +x /entrypoint.sh
VOLUME [ "/home/i2pd/data/" ]
WORKDIR "/home/i2pd/"
ENTRYPOINT ["/entrypoint.sh"]