Skip to content

Commit c2119d4

Browse files
committed
fix(router): ubuntu-debotstrap doesn't have netstat and confd errors are redirected to /dev/null.
1 parent f521001 commit c2119d4

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

router/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM ubuntu-debootstrap:14.04
33
ENV DEBIAN_FRONTEND noninteractive
44

55
# install common packages
6-
RUN apt-get update && apt-get install -y libgeoip1 curl && apt-get clean
6+
RUN apt-get update && apt-get install -y libgeoip1 curl net-tools && apt-get clean
77

88
# install etcdctl
99
RUN curl -sSL -o /usr/local/bin/etcdctl https://s3-us-west-2.amazonaws.com/opdemand/etcdctl-v0.4.6 \

router/bin/boot

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ etcd_set_default gzipVary on
4545
etcd_set_default gzipDisable "\"msie6\""
4646
etcd_set_default gzipTypes "application/x-javascript application/xhtml+xml application/xml application/xml+rss application/json text/css text/javascript text/plain text/xml"
4747

48-
# wait for confd to run once and install initial templates
49-
until confd -onetime -node $ETCD -config-file /app/confd.toml >/dev/null 2>/dev/null; do
50-
echo "router: waiting for confd to write initial templates..."
51-
sleep $(($ETCD_TTL/2)) # sleep for half the TTL
52-
done
53-
5448
# spawn the service in the background
5549
echo "Starting Nginx..."
5650
/nginx/sbin/nginx &
@@ -64,6 +58,12 @@ function on_exit() {
6458
}
6559
trap on_exit INT TERM
6660

61+
# wait for confd to run once and install initial templates
62+
until confd -onetime -node $ETCD -config-file /app/confd.toml >/dev/null 2>/dev/null; do
63+
echo "router: waiting for confd to write initial templates..."
64+
sleep $(($ETCD_TTL/2)) # sleep for half the TTL
65+
done
66+
6767
# spawn confd in the background to update services based on etcd changes
6868
confd -node $ETCD -config-file /app/confd.toml &
6969
CONFD_PID=$!

0 commit comments

Comments
 (0)