File tree Expand file tree Collapse file tree 4 files changed +480
-13
lines changed Expand file tree Collapse file tree 4 files changed +480
-13
lines changed Original file line number Diff line number Diff line change 1
- FROM alpine:3.7
2
-
3
- ENV GOPATH=/go
4
-
1
+ FROM golang:1.14-alpine AS build
5
2
WORKDIR /go/src/github.com/utilitywarehouse/gcp-disk-snapshotter
6
3
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
-
4
+ ENV CGO_ENABLED 0
5
+ RUN apk --no-cache add git &&\
6
+ go get -t ./... &&\
7
+ go test ./... &&\
8
+ go build -o /gcp-disk-snapshotter .
9
+
10
+ FROM alpine:3.12
11
+ RUN apk --no-cache add ca-certificates
12
+ COPY --from=build /gcp-disk-snapshotter /gcp-disk-snapshotter
15
13
ENTRYPOINT [ "/gcp-disk-snapshotter" ]
Original file line number Diff line number Diff line change
1
+ module github.com/utilitywarehouse/gcp-disk-snapshotter
2
+
3
+ go 1.14
4
+
5
+ require (
6
+ cloud.google.com/go v0.61.0 // indirect
7
+ github.com/golang/mock v1.4.3
8
+ github.com/pkg/errors v0.9.1
9
+ github.com/prometheus/client_golang v1.7.1
10
+ github.com/sirupsen/logrus v1.6.0
11
+ github.com/stretchr/testify v1.6.1
12
+ github.com/utilitywarehouse/go-operational v0.0.0-20190722153447-b0f3f6284543
13
+ golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
14
+ golang.org/x/sys v0.0.0-20200722175500-76b94024e4b6 // indirect
15
+ google.golang.org/api v0.29.0
16
+ google.golang.org/genproto v0.0.0-20200724131911-43cab4749ae7 // indirect
17
+ )
You can’t perform that action at this time.
0 commit comments