File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 1
- FROM golang:1.10.4 as builder
1
+ FROM golang:1.11 as builder
2
+ ENV CGO_ENABLED=0
3
+
2
4
RUN mkdir -p /go/src/github.com/openfaas-incubator/vcenter-connector
3
5
WORKDIR /go/src/github.com/openfaas-incubator/vcenter-connector
4
6
@@ -14,7 +16,7 @@ RUN go test -v ./...
14
16
# Stripping via -ldflags "-s -w"
15
17
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-s -w" -installsuffix cgo -o ./connector
16
18
17
- FROM alpine:3.8
19
+ FROM alpine:3.10 as ship
18
20
19
21
RUN addgroup -S app \
20
22
&& adduser -S -g app app
Original file line number Diff line number Diff line change 1
- FROM golang:1.10.4 as builder
1
+ FROM golang:1.11 as builder
2
+ ENV CGO_ENABLED=0
3
+
2
4
RUN mkdir -p /go/src/github.com/openfaas-incubator/vcenter-connector
3
5
WORKDIR /go/src/github.com/openfaas-incubator/vcenter-connector
4
6
@@ -12,12 +14,21 @@ RUN test -z "$(gofmt -l $(find . -type f -name '*.go' -not -path "./vendor/*"))"
12
14
RUN go test -v ./...
13
15
14
16
# Stripping via -ldflags "-s -w"
15
- RUN GOARM=7 CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-s -w" -installsuffix cgo -o ./connector
17
+ RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-s -w" -installsuffix cgo -o ./connector
18
+
19
+ FROM alpine:3.10 as ship
20
+
21
+ RUN addgroup -S app \
22
+ && adduser -S -g app app
16
23
17
- FROM alpine:3.8
24
+ WORKDIR /home/app
18
25
19
26
EXPOSE 8989
20
27
21
- COPY --from=builder /go/src/github.com/openfaas-incubator/vcenter-connector/ .
28
+ COPY --from=builder /go/src/github.com/openfaas-incubator/vcenter-connector/connector .
29
+
30
+ RUN chown -R app:app ./
31
+
32
+ USER app
22
33
23
34
CMD ["./connector"]
You can’t perform that action at this time.
0 commit comments