From cb0afade3e2f409aea3655a7a336354084abe72e Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Mon, 22 May 2017 10:18:21 +0000 Subject: [PATCH] Use shfmt v1.3.0 instead of gopkg.in's v1 "inspired" by https://github.com/weaveworks/cortex/commit/1ba9d6d82c0c451835f6b9f8fdeecd12ebda5646 --- backend/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index eb8aa20fd..2764d9a0b 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -3,16 +3,18 @@ ENV GOPATH /go ENV GOVERSION 1.7 ENV PATH /go/bin:/usr/lib/go-${GOVERSION}/bin:/usr/bin:/bin:/usr/sbin:/sbin RUN apt-get update && \ - apt-get install -y libpcap-dev python-requests time file shellcheck golang-${GOVERSION} git gcc-arm-linux-gnueabihf && \ + apt-get install -y libpcap-dev python-requests time file shellcheck golang-${GOVERSION} git gcc-arm-linux-gnueabihf curl && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN go clean -i net && \ go install -tags netgo std && \ go install -race -tags netgo std +RUN curl -fsSL -o shfmt https://github.com/mvdan/sh/releases/download/v1.3.0/shfmt_v1.3.0_linux_amd64 && \ + chmod +x shfmt && \ + mv shfmt /usr/bin RUN go get -tags netgo \ github.com/fzipp/gocyclo \ github.com/golang/lint/golint \ github.com/kisielk/errcheck \ - gopkg.in/mvdan/sh.v1/cmd/shfmt \ github.com/fatih/hclfmt \ github.com/mjibson/esc \ github.com/client9/misspell/cmd/misspell && \