This guide uses Docker to run Consul.
For Docker installation, see Docker.
Create a directory to store your configuration and compose files.
mkdir -p /opt/consul
cd /opt/consul
Define a container for Consul.
services:
consul:
image: hashicorp/consul:latest
ports:
- "8500:8500"
- "8600:8600/tcp"
- "8600:8600/udp"
command: "agent -dev -client=0.0.0.0"
Start the container in the background.
docker compose up -d
hashicorp/consulAny questions?
Feel free to contact us. Find all contact information on our contact page.