FROM mcr.microsoft.com/windows/servercore:ltsc2019 ARG VERSION=1.16.0 ENV chocolateyVersion=1.4.0 LABEL org.opencontainers.image.authors="Consul Team " \ org.opencontainers.image.url="https://www.consul.io/" \ org.opencontainers.image.documentation="https://www.consul.io/docs" \ org.opencontainers.image.source="https://github.com/hashicorp/consul" \ org.opencontainers.image.version=$VERSION \ org.opencontainers.image.vendor="HashiCorp" \ org.opencontainers.image.title="consul" \ org.opencontainers.image.description="Consul is a datacenter runtime that provides service discovery, configuration, and orchestration." \ version=${VERSION} RUN ["powershell", "Set-ExecutionPolicy", "Bypass", "-Scope", "Process", "-Force;"] RUN ["powershell", "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"] RUN choco install git.install -yf RUN SETX /M path "%PATH%;C:\Program Files\Git\bin" RUN mkdir C:\\consul RUN mkdir C:\\consul\\data RUN mkdir C:\\consul\\config # Server RPC is used for communication between Consul clients and servers for internal # request forwarding. EXPOSE 8300 # Serf LAN and WAN (WAN is used only by Consul servers) are used for gossip between # Consul agents. LAN is within the datacenter and WAN is between just the Consul # servers in all datacenters. EXPOSE 8301 8301/udp 8302 8302/udp # HTTP and DNS (both TCP and UDP) are the primary interfaces that applications # use to interact with Consul. EXPOSE 8500 8600 8600/udp ENV CONSUL_URL=https://releases.hashicorp.com/consul/${VERSION}/consul_${VERSION}_windows_amd64.zip RUN curl %CONSUL_URL% -L -o consul.zip RUN tar -xf consul.zip -C consul COPY .release/docker/docker-entrypoint-windows.sh C:\\docker-entrypoint-windows.sh ENTRYPOINT ["bash.exe", "docker-entrypoint-windows.sh"] # By default you'll get an insecure single-node development server that stores # everything in RAM, exposes a web UI and HTTP endpoints, and bootstraps itself. # Don't use this configuration for production. CMD ["agent", "-dev", "-client", "0.0.0.0"]