forked from desotech-it/whoami
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindows.dockerfile
More file actions
32 lines (20 loc) · 784 Bytes
/
windows.dockerfile
File metadata and controls
32 lines (20 loc) · 784 Bytes
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
FROM golang:1.17-windowsservercore-1809 as builder
SHELL ["powershell","-NoProfile", "-Command"]
WORKDIR C:\\whoami
COPY . .
ENV CGO_ENABLED=0
RUN Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') ; \
scoop install make git ; \
make build
FROM mcr.microsoft.com/windows/servercore:1809
WORKDIR C:\\whoami
COPY --from=builder C:\\whoami\\template template\\
COPY --from=builder C:\\whoami\\static static\\
COPY --from=builder C:\\whoami\\bin .\\
# COPY in Windows dockerfiles doesn't work like in Linux so we need to resort to this hack
# to normalize the executable name
RUN ren whoami*.exe whoami.exe
# Create an empty file for readiness tests
RUN copy NUL readiness
ENTRYPOINT ["whoami.exe", "-p", "80"]
EXPOSE 80