forked from William-Yeh/fswatch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.wcow
More file actions
39 lines (28 loc) · 698 Bytes
/
Dockerfile.wcow
File metadata and controls
39 lines (28 loc) · 698 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
33
34
35
36
37
38
39
# fswatch - Watch for changes in file system.
#
#======================================#
# builder env
#
FROM golang:1.12.5 AS builder
LABEL author="william.pjyeh@gmail.com"
WORKDIR /opt
# unset GOPATH in favor of GO111MODULE
ENV GO111MODULE on
ENV GOPATH ""
# fetch imported Go lib...
COPY go.mod .
COPY go.sum .
COPY fswatch.go .
# compile...
ENV GOOS windows
ENV GOARCH amd64
ENV CGO_ENABLED 0
RUN go build -o fswatch-x86_64.exe
#======================================#
# deployment env
#
FROM mcr.microsoft.com/windows/nanoserver:1809
LABEL author="william.pjyeh@gmail.com"
COPY --from=builder /opt/fswatch-x86_64.exe fswatch.exe
RUN mkdir mnt
CMD ["fswatch"]