Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save swade1987/af7628709cc49e09dab97394909cd25a to your computer and use it in GitHub Desktop.

Select an option

Save swade1987/af7628709cc49e09dab97394909cd25a to your computer and use it in GitHub Desktop.
# Pull the consul image from Docker Hub (https://hub.docker.com/_/consul/)
sudo docker pull consul
# Create a consul server container binding port 8500
sudo docker run -d \
-p 8500:8500 \
-e 'CONSUL_LOCAL_CONFIG={"skip_leave_on_interrupt": true}' \
consul agent \
-server \
-ui \
-bind=0.0.0.0 \
-retry-join=0.0.0.0 \
-client=0.0.0.0 \
-bootstrap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment