github.com/nspcc-dev/neo-go@v0.105.2-0.20240517133400-6be757af3eba/Dockerfile.wsc (about) 1 # Builder image 2 # Keep go version in sync with Build GA job. 3 FROM golang:1.22.0-windowsservercore-ltsc2022 as builder 4 5 COPY . /neo-go 6 7 WORKDIR /neo-go 8 9 ARG REPO=repository 10 ARG VERSION=dev 11 12 SHELL ["cmd", "/S", "/C"] 13 RUN go env -w CGO_ENABLED=0 14 ENV GOGC=off 15 16 RUN go build -trimpath -v -o ./bin/neo-go.exe -ldflags="-X %REPO%/pkg/config.Version=%VERSION%" ./cli/main.go 17 18 # Executable image 19 FROM mcr.microsoft.com/windows/servercore:ltsc2022 20 21 ARG VERSION 22 LABEL version=%VERSION% 23 24 WORKDIR / 25 26 COPY --from=builder /neo-go/config /config 27 COPY --from=builder /neo-go/.docker/privnet-entrypoint.ps1 /usr/bin/privnet-entrypoint.ps1 28 COPY --from=builder /neo-go/bin/neo-go.exe /usr/bin/neo-go.exe 29 30 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';", "$ProgressPreference = 'SilentlyContinue';"] 31 32 # Check executable version. 33 RUN /usr/bin/neo-go.exe --version 34 35 ENTRYPOINT ["powershell", "-File", "/usr/bin/privnet-entrypoint.ps1"] 36 37 CMD ["node", "--config-path", "/config", "--privnet"]