mirror of
https://github.com/openfaas/faas.git
synced 2025-06-18 20:16:37 +00:00
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 <alexellis2@gmail.com>
This commit is contained in:
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user