From aecad407c5f09e8bd9c228c612b3819f6fd0672b Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Fri, 26 May 2017 11:28:40 +0100 Subject: [PATCH] tools: Add shellcheck to the Alpine base We use the "official" Alpine based Docker image and extract the binary and libraries from it and add to the base. Compiling it from source would require a Haskell setup... Signed-off-by: Rolf Neugebauer --- tools/alpine/Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/alpine/Dockerfile b/tools/alpine/Dockerfile index e78b9a634..1f215c3de 100644 --- a/tools/alpine/Dockerfile +++ b/tools/alpine/Dockerfile @@ -33,6 +33,9 @@ RUN go get -u github.com/golang/lint/golint RUN go get -u github.com/gordonklaus/ineffassign RUN go get -u github.com/LK4D4/vndr +FROM koalaman/shellcheck:v0.4.6@sha256:191b61e5f436fc51f22faaf2f4e0f77799f75977c7210377dd73a1a0f99ef8bd AS shellcheck + + FROM alpine:3.6 COPY --from=mirror /etc/apk/repositories /etc/apk/repositories @@ -40,4 +43,7 @@ COPY --from=mirror /etc/apk/keys /etc/apk/keys/ COPY --from=mirror /mirror /mirror/ COPY --from=mirror /go/bin /go/bin/ +COPY --from=shellcheck /usr/local/bin/shellcheck /usr/local/bin/shellcheck +COPY --from=shellcheck /usr/local/lib/ /usr/local/lib/ + RUN apk update && apk upgrade -a