Skip to content

Commit

Permalink
[CONSUL-187] Support dockerfile with consul binary (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
ezfepo authored and joselo85 committed Dec 21, 2022
1 parent 5587848 commit dea9dd8
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Dockerfile-windows
Original file line number Diff line number Diff line change
@@ -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%

0 comments on commit dea9dd8

Please sign in to comment.