github.com/stevenmatthewt/agent@v3.5.4+incompatible/Dockerfile-windows (about)

     1  ## Development docker image for buildkite-agent on windows
     2  FROM microsoft/windowsservercore:latest
     3  
     4  ENV ChocolateyUseWindowsCompression false
     5  
     6  # Set your PowerShell execution policy
     7  RUN powershell Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
     8  
     9  # Install Chocolatey
    10  RUN powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
    11  
    12  # Install Chocolatey packages
    13  RUN choco install -y git.install -params '"/GitAndUnixToolsOnPath"' && \
    14    choco install -y openssh && \
    15    choco install -y golang
    16  
    17  # Hack for mounting in code later (Use G:)
    18  # See https://github.com/moby/moby/issues/27537#issuecomment-271546031
    19  VOLUME c:/data
    20  RUN powershell set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices' -Name 'G:' -Value '\??\C:\data' -Type String
    21  
    22  # Copy across the agent source
    23  ENV GOPATH=c:/gopath
    24  WORKDIR c:/gopath/src/github.com/buildkite/agent
    25  COPY . .
    26  
    27  # Build agent and put binary in a dir in the PATH (remarkably hard to add to path)
    28  RUN go build -i -o .\buildkite-agent.exe
    29  
    30  CMD ["./buildkite-agent.exe", "start"]