-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.wsc
More file actions
37 lines (24 loc) · 1.02 KB
/
Dockerfile.wsc
File metadata and controls
37 lines (24 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Builder image
# Keep go version in sync with Build GA job.
FROM golang:1.22.0-windowsservercore-ltsc2022 as builder
COPY . /epicchain-go
WORKDIR /epicchain-go
ARG REPO=repository
ARG VERSION=dev
SHELL ["cmd", "/S", "/C"]
RUN go env -w CGO_ENABLED=0
ENV GOGC=off
RUN go build -trimpath -v -o ./bin/epicchain-go.exe -ldflags="-X %REPO%/pkg/config.Version=%VERSION%" ./cli/main.go
# Executable image
FROM mcr.microsoft.com/windows/servercore:ltsc2022
ARG VERSION
LABEL version=%VERSION%
WORKDIR /
COPY --from=builder /epicchain-go/config /config
COPY --from=builder /epicchain-go/.docker/privnet-entrypoint.ps1 /usr/bin/privnet-entrypoint.ps1
COPY --from=builder /epicchain-go/bin/epicchain-go.exe /usr/bin/epicchain-go.exe
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';", "$ProgressPreference = 'SilentlyContinue';"]
# Check executable version.
RUN /usr/bin/epicchain-go.exe --version
ENTRYPOINT ["powershell", "-File", "/usr/bin/privnet-entrypoint.ps1"]
CMD ["node", "--config-path", "/config", "--privnet"]