From dea9dd87ce29ba515bdd14065591f9adf54dd59f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ezequiel=20Fern=C3=A1ndez=20Ponce?= <20102608+ezfepo@users.noreply.github.com> Date: Fri, 8 Jul 2022 15:55:51 -0300 Subject: [PATCH] [CONSUL-187] Support dockerfile with consul binary (#11) --- Dockerfile-windows | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Dockerfile-windows diff --git a/Dockerfile-windows b/Dockerfile-windows new file mode 100644 index 0000000000..5d371392c8 --- /dev/null +++ b/Dockerfile-windows @@ -0,0 +1,23 @@ +ARG CONSUL_IMAGE_VERSION=1.12.0 +FROM mcr.microsoft.com/windows/servercore:1809 + +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 mkdir C:\\consul +RUN mkdir C:\\consul\\data +RUN mkdir C:\\consul\\config + +EXPOSE 8300 +EXPOSE 8301 8301/udp 8302 8302/udp +EXPOSE 8500 8600 8600/udp + +ENV CONSUL_VERSION=1.12.0 +ENV CONSUL_URL=https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_windows_amd64.zip + +RUN curl %CONSUL_URL% -L -o consul.zip +RUN tar -xf consul.zip -C consul + +ENV PATH C:\\Program Files\\Git\\bin;C:\\consul;%PATH%