summaryrefslogtreecommitdiff
path: root/other/bootstrap_daemon/docker
diff options
context:
space:
mode:
authorromik-g <paye600@gmail.com>2016-02-06 23:51:41 +0100
committerMaxim Biro <nurupo.contributions@gmail.com>2016-03-03 13:30:11 -0500
commitc2b2142f336640e35c27fd5fdbe8348ddcff16b5 (patch)
tree5bad1eeb9d0b29588d2c1b5154352b2de4206ac0 /other/bootstrap_daemon/docker
parent739975dc3d7cf2eafa4573e682e51528e7599285 (diff)
Changes from @nurupo for build and runtime dependencies that reduce image size
Also removal of example bootstrap nodes from the config file in one line
Diffstat (limited to 'other/bootstrap_daemon/docker')
-rw-r--r--other/bootstrap_daemon/docker/Dockerfile17
1 files changed, 6 insertions, 11 deletions
diff --git a/other/bootstrap_daemon/docker/Dockerfile b/other/bootstrap_daemon/docker/Dockerfile
index bfa8f1e1..d4d611b5 100644
--- a/other/bootstrap_daemon/docker/Dockerfile
+++ b/other/bootstrap_daemon/docker/Dockerfile
@@ -12,9 +12,10 @@ RUN export BUILD_PACKAGES="\
12 git \ 12 git \
13 yasm \ 13 yasm \
14 libsodium-dev \ 14 libsodium-dev \
15 libconfig-dev \
15 python3" && \ 16 python3" && \
16 export RUNTIME_PACKAGES="\ 17 export RUNTIME_PACKAGES="\
17 libconfig-dev \ 18 libconfig9 \
18 libsodium13" && \ 19 libsodium13" && \
19# get all deps 20# get all deps
20 apt-get update && apt-get install -y $BUILD_PACKAGES $RUNTIME_PACKAGES && \ 21 apt-get update && apt-get install -y $BUILD_PACKAGES $RUNTIME_PACKAGES && \
@@ -34,23 +35,18 @@ RUN export BUILD_PACKAGES="\
34 chmod 700 /var/lib/tox-bootstrapd && \ 35 chmod 700 /var/lib/tox-bootstrapd && \
35 cp other/bootstrap_daemon/tox-bootstrapd.conf /etc/tox-bootstrapd.conf && \ 36 cp other/bootstrap_daemon/tox-bootstrapd.conf /etc/tox-bootstrapd.conf && \
36# remove all the example bootstrap nodes from the config file 37# remove all the example bootstrap nodes from the config file
37 N=-1 && \ 38 sed -i '/^bootstrap_nodes = /,$d' /etc/tox-bootstrapd.conf && \
38 while grep -q "bootstrap_nodes =" /etc/tox-bootstrapd.conf; \
39 do \
40 head -n $N other/bootstrap_daemon/tox-bootstrapd.conf > /etc/tox-bootstrapd.conf; \
41 N=$((N-1)); \
42 done && \
43# add bootstrap nodes from https://nodes.tox.chat/ 39# add bootstrap nodes from https://nodes.tox.chat/
44 python3 other/bootstrap_daemon/docker/get-nodes.py >> /etc/tox-bootstrapd.conf && \ 40 python3 other/bootstrap_daemon/docker/get-nodes.py >> /etc/tox-bootstrapd.conf && \
41# perform cleanup
45 export AUTO_ADDED_PACKAGES="$(apt-mark showauto)" && \ 42 export AUTO_ADDED_PACKAGES="$(apt-mark showauto)" && \
46 apt-get remove --purge -y $BUILD_PACKAGES $AUTO_ADDED_PACKAGES && \ 43 apt-get remove --purge -y $BUILD_PACKAGES $AUTO_ADDED_PACKAGES && \
47 apt-get install -y $RUNTIME_PACKAGES && \
48 apt-get clean && \ 44 apt-get clean && \
49 rm -rf /var/lib/apt/lists/* && \ 45 rm -rf /var/lib/apt/lists/* && \
50 cd / && \ 46 cd / && \
51 rm -rf /tmp/* 47 rm -rf /tmp/*
52 48
53WORKDIR / 49WORKDIR /var/lib/tox-bootstrapd
54 50
55USER tox-bootstrapd 51USER tox-bootstrapd
56 52
@@ -59,5 +55,4 @@ ENTRYPOINT /usr/local/bin/tox-bootstrapd \
59 --log-backend stdout \ 55 --log-backend stdout \
60 --foreground 56 --foreground
61 57
62EXPOSE 443 3389 33445 58EXPOSE 443/tcp 3389/tcp 33445/tcp 33445/udp
63EXPOSE 33445/udp