From b26b95cab55bca64d777c4bf24035cf1c31ef066 Mon Sep 17 00:00:00 2001 From: Alex Ellis Date: Thu, 11 Apr 2019 20:57:17 +0100 Subject: [PATCH] Update Dockerfiles There is a utility script which can be used for installing license-check. This is added to the gateway Dockerfiles. Tested in Docker for Mac. Signed-off-by: Alex Ellis --- gateway/Dockerfile | 6 +++--- gateway/Dockerfile.arm64 | 9 +++++---- gateway/Dockerfile.armhf | 6 +++--- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/gateway/Dockerfile b/gateway/Dockerfile index cec780b2..c5cc647c 100644 --- a/gateway/Dockerfile +++ b/gateway/Dockerfile @@ -3,9 +3,9 @@ ARG GIT_COMMIT_SHA ARG GIT_COMMIT_MESSAGE ARG VERSION='dev' -RUN curl -sSfL https://github.com/alexellis/license-check/releases/download/0.2.2/license-check \ - > /usr/bin/license-check \ - && chmod +x /usr/bin/license-check +RUN curl -sLSf \ + https://raw.githubusercontent.com/teamserverless/license-check/master/get.sh | sh \ + && mv ./license-check /usr/bin/ WORKDIR /go/src/github.com/openfaas/faas/gateway diff --git a/gateway/Dockerfile.arm64 b/gateway/Dockerfile.arm64 index 05dfae4c..3c5be324 100644 --- a/gateway/Dockerfile.arm64 +++ b/gateway/Dockerfile.arm64 @@ -1,7 +1,9 @@ FROM golang:1.10.4 as build WORKDIR /go/src/github.com/openfaas/faas/gateway -#RUN curl -sL https://github.com/alexellis/license-check/releases/download/0.1/license-check > /usr/bin/license-check && chmod +x /usr/bin/license-check +RUN curl -sLSf \ + https://raw.githubusercontent.com/teamserverless/license-check/master/get.sh | sh \ + && mv ./license-check /usr/bin/ COPY vendor vendor @@ -18,10 +20,10 @@ COPY scaling scaling COPY server.go . # Run a gofmt and exclude all vendored code. -#RUN license-check -path ./ --verbose=false \ +RUN license-check -path ./ --verbose=false \ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gateway . -FROM alpine:3.8 +FROM alpine:3.9 RUN addgroup -S app \ && adduser -S -g app app @@ -34,7 +36,6 @@ ENV http_proxy "" ENV https_proxy "" - COPY --from=build /go/src/github.com/openfaas/faas/gateway/gateway . COPY assets assets diff --git a/gateway/Dockerfile.armhf b/gateway/Dockerfile.armhf index 5b72f0c3..0110a565 100644 --- a/gateway/Dockerfile.armhf +++ b/gateway/Dockerfile.armhf @@ -3,9 +3,9 @@ ARG GIT_COMMIT_SHA ARG GIT_COMMIT_MESSAGE ARG VERSION='dev' -RUN curl -sSfL https://github.com/alexellis/license-check/releases/download/0.2.3/license-check-armhf \ - > /usr/bin/license-check \ - && chmod +x /usr/bin/license-check +RUN curl -sLSf \ + https://raw.githubusercontent.com/teamserverless/license-check/master/get.sh | sh \ + && mv ./license-check /usr/bin/ WORKDIR /go/src/github.com/openfaas/faas/gateway