Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Commit

Permalink
Use license-check docker image instead of curl
Browse files Browse the repository at this point in the history
Optimizes Docker builds by copying from license-check Docker image
instead of using curl to download the tool.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
  • Loading branch information
hasheddan authored and alexellis committed Feb 6, 2020
1 parent bb8b883 commit c3059c8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM teamserverless/license-check:0.3.6 as license-check

FROM golang:1.11 as build
RUN curl -sLSf https://raw.githubusercontent.com/teamserverless/license-check/master/get.sh | sh
RUN mv ./license-check /usr/bin/license-check && chmod +x /usr/bin/license-check

COPY --from=license-check /license-check /usr/bin/

RUN mkdir -p /go/src/github.com/openfaas/faas-swarm/

Expand Down
6 changes: 4 additions & 2 deletions Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM teamserverless/license-check:0.3.6 as license-check

FROM golang:1.11 as build
RUN curl -sLSf https://raw.githubusercontent.com/teamserverless/license-check/master/get.sh | sh
RUN mv ./license-check /usr/bin/license-check && chmod +x /usr/bin/license-check

COPY --from=license-check /license-check /usr/bin/

RUN mkdir -p /go/src/github.com/openfaas/faas-swarm/

Expand Down
6 changes: 4 additions & 2 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM teamserverless/license-check:0.3.6 as license-check

FROM golang:1.11 as build
RUN curl -sLSf https://raw.githubusercontent.com/teamserverless/license-check/master/get.sh | sh
RUN mv ./license-check /usr/bin/license-check && chmod +x /usr/bin/license-check

COPY --from=license-check /license-check /usr/bin/

RUN mkdir -p /go/src/github.com/openfaas/faas-swarm/

Expand Down

0 comments on commit c3059c8

Please sign in to comment.