File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# escape=`
22FROM microsoft/nanoserver
3- # note this version was a tagging mistake and the version is usually referred to as 0.10 - https://github.com/mholt/caddy/releases/tag/v0.10.0
43ENV CADDY_VERSION 0.10.0
54RUN powershell -Command $ErrorActionPreference = 'Stop' ; $ProgressPreference = 'SilentlyContinue' ; `
65 Invoke-WebRequest $('https://github.com/mholt/caddy/releases/download/v{0}/caddy_v{0}_windows_amd64.zip' -f $env:CADDY_VERSION) -OutFile 'caddy.zip' -UseBasicParsing ; `
Original file line number Diff line number Diff line change 1- docker build - t caddy:0.10 .
1+ $version = $ (select-string - Path Dockerfile - Pattern " ENV CADDY_VERSION" ).ToString().split()[-1 ]
2+ docker build - t caddy:$version .
Original file line number Diff line number Diff line change 1- docker tag caddy:0.10 stefanscherer/ caddy- windows:0.10
2- docker tag caddy:0.10 stefanscherer/ caddy- windows:latest
3- docker push stefanscherer/ caddy- windows:0.10
1+ $version = $ (select-string - Path Dockerfile - Pattern " ENV CADDY_VERSION" ).ToString().split()[-1 ]
2+ docker tag caddy:$version stefanscherer/ caddy- windows:$version
3+ docker tag caddy:$version stefanscherer/ caddy- windows:latest
4+ docker push stefanscherer/ caddy- windows:$version
45docker push stefanscherer/ caddy- windows:latest
Original file line number Diff line number Diff line change 1- docker run -- name caddy - d - p 8080 :80 - v " $ ( pwd) \conf:C:\caddy\conf" - v " $ ( pwd) \www:C:\wwwroot" caddy:0.10
1+ $version = $ (select-string - Path Dockerfile - Pattern " ENV CADDY_VERSION" ).ToString().split()[-1 ]
2+ docker run -- name caddy - d - p 8080 :80 - v " $ ( pwd) \conf:C:\caddy\conf" - v " $ ( pwd) \www:C:\wwwroot" caddy:$version
23Start-Sleep - Seconds 5
34$req = Invoke-WebRequest http:// $ (docker inspect -f ' {{ .NetworkSettings.Networks.nat.IPAddress }}' caddy) - UseBasicParsing
45$code = $req.statuscode
You can’t perform that action at this time.
0 commit comments