File tree 2 files changed +12
-10
lines changed
2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change
1
+ FROM teamserverless/license-check:0.3.6 as license-check
2
+
1
3
FROM golang:1.13 as build
2
4
ENV CGO_ENABLED=0
3
5
ENV GO111MODULE=on
4
6
ENV GOFLAGS=-mod=vendor
5
7
6
- RUN curl -sLSf https://raw.githubusercontent.com/teamserverless/license-check/master/get.sh | sh
7
- RUN mv ./license-check /usr/bin/license-check && chmod +x /usr/bin/license-check
8
+ COPY --from=license-check /license-check /usr/bin/
8
9
9
10
RUN mkdir -p /go/src/github.com/openfaas/faas-netes
10
11
WORKDIR /go/src/github.com/openfaas/faas-netes
11
12
COPY . .
12
13
13
14
RUN license-check -path /go/src/github.com/openfaas/faas-netes/ --verbose=false "Alex Ellis" "OpenFaaS Author(s)"
14
- RUN gofmt -l -d $(find . -type f -name '*.go' -not -path "./vendor/*") \
15
- && go test -v ./...
15
+ RUN gofmt -l -d $(find . -type f -name '*.go' -not -path "./vendor/*")
16
+ RUN go test -v ./...
16
17
17
18
RUN VERSION=$(git describe --all --exact-match `git rev-parse HEAD` | grep tags | sed 's/tags\///') \
18
19
&& GIT_COMMIT=$(git rev-list -1 HEAD) \
@@ -43,7 +44,7 @@ EXPOSE 8080
43
44
ENV http_proxy ""
44
45
ENV https_proxy ""
45
46
46
- COPY --from=0 /go/src/github.com/openfaas/faas-netes/faas-netes .
47
+ COPY --from=build /go/src/github.com/openfaas/faas-netes/faas-netes .
47
48
RUN chown -R app:app ./
48
49
49
50
USER app
Original file line number Diff line number Diff line change
1
+ FROM teamserverless/license-check:0.3.6 as license-check
2
+
1
3
FROM golang:1.13 as build
2
4
ENV CGO_ENABLED=0
3
5
ENV GO111MODULE=on
4
6
ENV GOFLAGS=-mod=vendor
5
7
6
- RUN curl -sLSf https://raw.githubusercontent.com/teamserverless/license-check/master/get.sh | sh
7
- RUN mv ./license-check /usr/bin/license-check && chmod +x /usr/bin/license-check
8
+ COPY --from=license-check /license-check /usr/bin/
8
9
9
10
RUN mkdir -p /go/src/github.com/openfaas/faas-netes
10
11
WORKDIR /go/src/github.com/openfaas/faas-netes
11
12
COPY . .
12
13
13
14
RUN license-check -path /go/src/github.com/openfaas/faas-netes/ --verbose=false "Alex Ellis" "OpenFaaS Author(s)"
14
- RUN gofmt -l -d $(find . -type f -name '*.go' -not -path "./vendor/*") \
15
- && go test -v ./...
15
+ RUN gofmt -l -d $(find . -type f -name '*.go' -not -path "./vendor/*")
16
+ RUN go test -v ./...
16
17
17
18
RUN VERSION=$(git describe --all --exact-match `git rev-parse HEAD` | grep tags | sed 's/tags\///') \
18
19
&& GIT_COMMIT=$(git rev-list -1 HEAD) \
@@ -43,7 +44,7 @@ EXPOSE 8080
43
44
ENV http_proxy ""
44
45
ENV https_proxy ""
45
46
46
- COPY --from=0 /go/src/github.com/openfaas/faas-netes/faas-netes .
47
+ COPY --from=build /go/src/github.com/openfaas/faas-netes/faas-netes .
47
48
RUN chown -R app:app ./
48
49
49
50
USER app
You can’t perform that action at this time.
0 commit comments