Last active
September 7, 2016 14:12
-
-
Save sonnysideup/4c374103f8158075c1248348fb3f5138 to your computer and use it in GitHub Desktop.
Building a base image using envconsul
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM envconsul:latest | |
# how can i set the prefix here? preceding the cmd seems ugly | |
CMD ["my-command", "arg1", "argN"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM base:latest | |
# | |
# install steps | |
# | |
ENTRYPOINT ["/path/to/envconsul"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "$CONSUL" ]; then | |
echo "WARNING! Consul not available, running locally." | |
$@ | |
else | |
/usr/local/bin/envconsul \ | |
-config=/etc/envconsul.hcl \ | |
-consul=${CONSUL_SERVER}:8500 \ | |
-prefix=${CONSUL_PREFIX:-/} $@ | |
fi | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment