Skip to content

Commit 3ec6c98

Browse files
author
Foivos Filippopoulos
committed
Add dockerfile
1 parent 54eeb6b commit 3ec6c98

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM alpine:3.7
2+
3+
ENV GOPATH=/go
4+
5+
WORKDIR /go/src/github.com/utilitywarehouse/gcp-disk-snapshotter
6+
COPY . /go/src/github.com/utilitywarehouse/gcp-disk-snapshotter
7+
8+
RUN \
9+
apk --no-cache add ca-certificates git go musl-dev && \
10+
go get -t ./... && \
11+
go test ./... && \
12+
CGO_ENABLED=0 go build -ldflags '-s -extldflags "-static"' -o /gcp-disk-snapshotter . && \
13+
apk del go musl-dev && rm -r /go
14+
15+
ENTRYPOINT [ "/gcp-disk-snapshotter" ]

0 commit comments

Comments
 (0)