File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ FROM ubuntu-debootstrap:14.04
33ENV 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
99RUN curl -sSL -o /usr/local/bin/etcdctl https://s3-us-west-2.amazonaws.com/opdemand/etcdctl-v0.4.6 \
Original file line number Diff line number Diff line change @@ -45,12 +45,6 @@ etcd_set_default gzipVary on
4545etcd_set_default gzipDisable " \" msie6\" "
4646etcd_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
5549echo " Starting Nginx..."
5650/nginx/sbin/nginx &
@@ -64,6 +58,12 @@ function on_exit() {
6458}
6559trap 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
6868confd -node $ETCD -config-file /app/confd.toml &
6969CONFD_PID=$!
You can’t perform that action at this time.
0 commit comments