Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 17, 2020 05:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/27eb0144ccd54cec8ee55db26de8712f to your computer and use it in GitHub Desktop.
Save velotiotech/27eb0144ccd54cec8ee55db26de8712f to your computer and use it in GitHub Desktop.
Velotio - HashiCorp Consul Part 2 - Dockerfile for Consul Server Docker Container
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y \
bash curl nano net-tools zip unzip \
jq dnsutils iputils-ping
ADD https://releases.hashicorp.com/consul/1.4.4/consul_1.4.4_linux_amd64.zip /tmp/consul.zip
RUN cd /bin && unzip /tmp/consul.zip && chmod +x /bin/consul && rm /tmp/consul.zip
# Consul ports
EXPOSE 8300 8301 8302 8400 8500
ADD consul_server.sh /opt
RUN mkdir -p /data
VOLUME /data
CMD ["/opt/consul_server.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment