mirror of
https://github.com/openfaas/faas.git
synced 2025-06-16 12:16:47 +00:00
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 <georgedanielmangum@gmail.com>
This commit is contained in:
parent
0fc5eeefb9
commit
5fa7e0f8a0
@ -1,11 +1,12 @@
|
||||
FROM teamserverless/license-check:0.3.6 as license-check
|
||||
|
||||
FROM golang:1.12-alpine3.11 as build
|
||||
|
||||
ENV GO111MODULE=off
|
||||
ENV CGO_ENABLED=0
|
||||
|
||||
RUN apk add --no-cache curl ca-certificates
|
||||
RUN curl -sLSf https://raw.githubusercontent.com/teamserverless/license-check/master/get.sh | sh \
|
||||
&& mv ./license-check /usr/bin/
|
||||
COPY --from=license-check /license-check /usr/bin/
|
||||
|
||||
WORKDIR /go/src/handler
|
||||
COPY . .
|
||||
|
@ -1,11 +1,12 @@
|
||||
FROM teamserverless/license-check:0.3.6 as license-check
|
||||
|
||||
FROM golang:1.12-alpine3.11 as build
|
||||
|
||||
ENV GO111MODULE=off
|
||||
ENV CGO_ENABLED=0
|
||||
|
||||
RUN apk add --no-cache curl ca-certificates gcc musl-dev
|
||||
RUN curl -sLSf https://raw.githubusercontent.com/teamserverless/license-check/master/get.sh | sh \
|
||||
&& mv ./license-check /usr/bin/
|
||||
COPY --from=license-check /license-check /usr/bin/
|
||||
|
||||
WORKDIR /go/src/handler
|
||||
COPY . .
|
||||
|
@ -1,3 +1,5 @@
|
||||
FROM teamserverless/license-check:0.3.6 as license-check
|
||||
|
||||
FROM golang:1.12 as build
|
||||
|
||||
ENV GO111MODULE=off
|
||||
@ -10,9 +12,7 @@ ARG ARCH="x86_64"
|
||||
ARG GOOS=linux
|
||||
ARG GOARM
|
||||
|
||||
RUN curl -sLSf \
|
||||
https://raw.githubusercontent.com/teamserverless/license-check/master/get.sh | sh \
|
||||
&& mv ./license-check /usr/bin/
|
||||
COPY --from=license-check /license-check /usr/bin/
|
||||
|
||||
WORKDIR /go/src/github.com/openfaas/faas/gateway
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
FROM teamserverless/license-check:0.3.6 as license-check
|
||||
|
||||
FROM golang:1.12 as build
|
||||
|
||||
ENV GO111MODULE=off
|
||||
@ -7,9 +9,7 @@ ARG GIT_COMMIT_SHA
|
||||
ARG GIT_COMMIT_MESSAGE
|
||||
ARG VERSION='dev'
|
||||
|
||||
RUN curl -sLSf \
|
||||
https://raw.githubusercontent.com/teamserverless/license-check/master/get.sh | sh \
|
||||
&& mv ./license-check /usr/bin/
|
||||
COPY --from=license-check /license-check /usr/bin/
|
||||
|
||||
WORKDIR /go/src/github.com/openfaas/faas/gateway
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
FROM teamserverless/license-check:0.3.6 as license-check
|
||||
|
||||
FROM golang:1.12 as build
|
||||
|
||||
ENV GO111MODULE=off
|
||||
@ -7,9 +9,7 @@ ARG GIT_COMMIT_SHA
|
||||
ARG GIT_COMMIT_MESSAGE
|
||||
ARG VERSION='dev'
|
||||
|
||||
RUN curl -sLSf \
|
||||
https://raw.githubusercontent.com/teamserverless/license-check/master/get.sh | sh \
|
||||
&& mv ./license-check /usr/bin/
|
||||
COPY --from=license-check /license-check /usr/bin/
|
||||
|
||||
WORKDIR /go/src/github.com/openfaas/faas/gateway
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user