Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hosting
consul-proxy
Commits
39043ce5
Commit
39043ce5
authored
Mar 10, 2016
by
Thomas Urban
Browse files
dropping use of separate start file
parent
24174c2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
39043ce5
...
@@ -4,14 +4,8 @@ MAINTAINER Thomas Urban <thomas.urban@cepharum.de>
...
@@ -4,14 +4,8 @@ MAINTAINER Thomas Urban <thomas.urban@cepharum.de>
ADD
https://releases.hashicorp.com/consul/0.6.3/consul_0.6.3_linux_amd64.zip /tmp/consul.zip
ADD
https://releases.hashicorp.com/consul/0.6.3/consul_0.6.3_linux_amd64.zip /tmp/consul.zip
RUN
cd
/bin
&&
unzip /tmp/consul.zip
&&
chmod
+x /bin/consul
&&
rm
/tmp/consul.zip
RUN
cd
/bin
&&
unzip /tmp/consul.zip
&&
chmod
+x /bin/consul
&&
rm
/tmp/consul.zip
ADD
./start /bin/start
EXPOSE
8300 8301 8301/udp 8302 8302/udp 8400 8500 53/udp
EXPOSE
8300 8301 8301/udp 8302 8302/udp 8400 8500 53/udp
VOLUME
/etc/consul /var/spool/consul
VOLUME
/etc/consul /var/spool/consul
ENV
SHELL /bin/bash
ENTRYPOINT
["/bin/consul", "agent", "-config-file", "/etc/consul/config"]
ENTRYPOINT
["/bin/start"]
CMD
[]
start
View file @
39043ce5
#!/bin/sh
#!/bin/sh
# convert listed server nodes into options for joining their cluster on start
consul agent
-config-file
/etc/consul/config
JOINS
=
"
$(
for
IP
in
$(
awk
'$NF>0'
</etc/consul/servers | xargs
--
getent ahostsv4 |
awk
'{print $1}'
|
uniq
)
;
do
echo
"-retry-join=
$IP
"
;
done
)
"
consul agent
-config-file
/etc/consul/config
-client
=
"127.0.0.1"
$JOINS
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment