Skip to content

Commit 7660768

Browse files
hasheddanalexellis
authored andcommitted
Use license-check docker image instead of curl
Optimizes Docker builds by copying from license-check Docker image instead of using curl to download the tool. Signed-off-by: hasheddan <[email protected]>
1 parent e2c8282 commit 7660768

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
FROM teamserverless/license-check:0.3.6 as license-check
2+
13
FROM golang:1.11 as build
24
ENV CGO_ENABLED=0
35

@@ -7,8 +9,8 @@ WORKDIR /go/src/github.com/openfaas-incubator/faas-memory
79

810
COPY . .
911

10-
RUN curl -sL https://github.com/alexellis/license-check/releases/download/0.2.2/license-check > /usr/bin/license-check \
11-
&& chmod +x /usr/bin/license-check
12+
COPY --from=license-check /license-check /usr/bin/
13+
1214
RUN license-check -path ./ --verbose=false "Alex Ellis" "OpenFaaS Author(s)"
1315

1416
RUN gofmt -l -d $(find . -type f -name '*.go' -not -path "./vendor/*") \

0 commit comments

Comments
 (0)