summaryrefslogtreecommitdiff
path: root/other
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-09-26 22:27:44 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-10-08 23:00:35 +0000
commit77e025fae48a4f9cf6cf19a359b6c423545f3cc7 (patch)
tree103b93ddebfc506f8263afda720e54475dbcabac /other
parent15d64221f156e0c37abf766513eff7edf3417bbc (diff)
Remove Alpine Linux bootstrap daemon dockerfile.
We can add it back when there is a test for it. For now, we don't know whether it works and don't have tests to make sure it keeps working.
Diffstat (limited to 'other')
-rw-r--r--other/bootstrap_daemon/docker/Dockerfile.alpine72
1 files changed, 0 insertions, 72 deletions
diff --git a/other/bootstrap_daemon/docker/Dockerfile.alpine b/other/bootstrap_daemon/docker/Dockerfile.alpine
deleted file mode 100644
index 48d9f44d..00000000
--- a/other/bootstrap_daemon/docker/Dockerfile.alpine
+++ /dev/null
@@ -1,72 +0,0 @@
1# Tox network node
2FROM alpine:latest
3LABEL Description="This image is used to run Tox network node" Vendor="n/a" Version="0.0.0"
4
5# Tox core code
6ADD https://github.com/TokTok/c-toxcore/archive/master.zip /tmp/tox/
7
8WORKDIR /tmp/tox
9
10RUN set -x && \
11# Disable root
12 sed -i 's/^root::/root:!:/' /etc/shadow && \
13# Add tox user and group, create home directory
14 addgroup -S tox-bootstrapd && \
15 adduser -h /var/lib/tox-bootstrapd -g "Account to run Tox's DHT bootstrap daemon" -s /sbin/nologin -G tox-bootstrapd -S -D -H tox-bootstrapd && \
16 install -d -o tox-bootstrapd -g tox-bootstrapd -m 700 /var/lib/tox-bootstrapd && \
17 function su_wrapper () { su -s /bin/sh -c "$@" tox-bootstrapd; return $?; } && \
18# Install libs and build tools
19 apk --no-cache add libsodium libconfig && \
20 apk --no-cache add --virtual build-dependencies \
21 autoconf \
22 automake \
23 curl \
24 build-base \
25 libtool \
26 libconfig-dev \
27 libsodium-dev \
28 libvpx-dev \
29 linux-headers \
30 opus-dev \
31 python3 \
32 unzip && \
33# Unzip
34 chown tox-bootstrapd:tox-bootstrapd /tmp/tox && \
35 chmod 644 /tmp/tox/master.zip && \
36 su_wrapper "unzip -tq master.zip" && \
37 su_wrapper "unzip -aq master.zip" && \
38# Compile
39 cd c-toxcore-master && \
40 su_wrapper "./autogen.sh" && \
41 su_wrapper "./configure --prefix=/usr --enable-daemon --disable-av" && \
42 su_wrapper "make" && \
43# Run tests (they FAIL mostly if you don't have enough compute resources)
44# for i in $(seq 1 10); do echo "=== check attempt $i ==="; su_wrapper "make check"; ret=$?; echo "=== check returned $ret ==="; if [ $ret -eq 0 ]; then echo "=== check passed ==="; break; elif [ $i -eq 10 ]; then echo "=== too many failures, aborting ==="; exit 1; fi; done && \
45#
46# Install tox daemon and copy base network node configuration file
47 make install && \
48 install -o root -g root -m 644 other/bootstrap_daemon/tox-bootstrapd.conf /etc/tox-bootstrapd.conf && \
49# Remove all the example bootstrap nodes from the config file and add nodes to bootstrap from
50 sed -i '/^bootstrap_nodes = /,$d' /etc/tox-bootstrapd.conf && \
51 python3 other/bootstrap_daemon/docker/get-nodes.py >> /etc/tox-bootstrapd.conf && \
52# Clean build dependencies and build files
53 cd / && \
54 rm -rf /tmp/tox && \
55 apk del build-dependencies && \
56# Tox network node daemon configuration
57# Disable LAN discovery, because we are on a server
58 sed -i 's/enable_lan_discovery = true/enable_lan_discovery = false/' /etc/tox-bootstrapd.conf && \
59# MOTD
60 sed -i 's/motd = "tox-bootstrapd"/motd = "tox-bootstrapd docker"/' /etc/tox-bootstrapd.conf
61
62
63# Tox daemon home directory
64WORKDIR /var/lib/tox-bootstrapd
65
66# Ports
67EXPOSE 443/tcp 443/udp 3389/tcp 3389/udp 33445/tcp 33445/udp
68
69# Run cmd
70#CMD ["/bin/sh"]
71USER tox-bootstrapd
72CMD ["/usr/bin/tox-bootstrapd", "--config=/etc/tox-bootstrapd.conf", "--foreground", "--log-backend=stdout"]