forked from TrueCloudLab/neoneo-go
Dockerfile: build docker images on go 1.20
This commit is contained in:
parent
3f6a88c239
commit
ec002f31df
2 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Builder image
|
# Builder image
|
||||||
# Keep go version in sync with Build GA job.
|
# Keep go version in sync with Build GA job.
|
||||||
FROM golang:1.18-alpine as builder
|
FROM golang:1.20-alpine as builder
|
||||||
|
|
||||||
# Display go version for information purposes.
|
# Display go version for information purposes.
|
||||||
RUN go version
|
RUN go version
|
||||||
|
|
|
@ -43,14 +43,14 @@ RUN $newPath = ('{0}\bin;C:\Program Files\Go\bin;{1}' -f $env:GOPATH, $env:PATH)
|
||||||
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine);
|
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine);
|
||||||
|
|
||||||
# Keep go version in sync with Build GA job.
|
# Keep go version in sync with Build GA job.
|
||||||
ENV GOLANG_VERSION=1.19
|
ENV GOLANG_VERSION=1.20
|
||||||
|
|
||||||
RUN $url = 'https://go.dev/dl/go1.19.windows-amd64.zip'; \
|
RUN $url = 'https://go.dev/dl/go1.20.windows-amd64.zip'; \
|
||||||
Write-Host ('Downloading {0} ...' -f $url); \
|
Write-Host ('Downloading {0} ...' -f $url); \
|
||||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
||||||
Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \
|
Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \
|
||||||
\
|
\
|
||||||
$sha256 = 'bcaaf966f91980d35ae93c37a8fe890e4ddfca19448c0d9f66c027d287e2823a'; \
|
$sha256 = 'e8f6d8bbcf3df58d2ba29818e13b04c2e42ba2e4d90d580720b21c34d10bbf68'; \
|
||||||
Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \
|
Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \
|
||||||
if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \
|
if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \
|
||||||
Write-Host 'FAILED!'; \
|
Write-Host 'FAILED!'; \
|
||||||
|
|
Loading…
Reference in a new issue