File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,15 @@ RUN yum install -y epel-release && yum install -y jq
1616RUN yum install -y rsync
1717
1818# Copied from ../debian10/Dockerfile
19- # Install Go dependencies
19+ # Install Go.
2020RUN ARCH="$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/')" && \
2121 curl -fsSL "https://dl.google.com/go/go1.14.3.linux-$ARCH.tar.gz" | tar -C /usr/local -xz
22- ENV PATH=/usr/local/go/bin:/root/go/bin:$PATH
22+ ENV GOPATH=/gopath
23+ # Ensures running this image as another user works.
24+ RUN mkdir -p $GOPATH && chmod -R 777 $GOPATH
25+ ENV PATH=/usr/local/go/bin:$GOPATH/bin:$PATH
26+
27+ # Install Go dependencies
2328ENV GO111MODULE=on
2429RUN go get mvdan.cc/sh/v3/cmd/shfmt
2530RUN go get github.com/goreleaser/nfpm/cmd/nfpm
Original file line number Diff line number Diff line change @@ -32,10 +32,15 @@ RUN curl -fsSL https://github.com/koalaman/shellcheck/releases/download/v0.7.1/s
3232 mv shellcheck*/shellcheck /usr/local/bin && \
3333 rm -R shellcheck*
3434
35- # Install Go dependencies
35+ # Install Go.
3636RUN ARCH="$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/')" && \
3737 curl -fsSL "https://dl.google.com/go/go1.14.3.linux-$ARCH.tar.gz" | tar -C /usr/local -xz
38- ENV PATH=/usr/local/go/bin:/root/go/bin:$PATH
38+ ENV GOPATH=/gopath
39+ # Ensures running this image as another user works.
40+ RUN mkdir -p $GOPATH && chmod -R 777 $GOPATH
41+ ENV PATH=/usr/local/go/bin:$GOPATH/bin:$PATH
42+
43+ # Install Go dependencies
3944ENV GO111MODULE=on
4045RUN go get mvdan.cc/sh/v3/cmd/shfmt
4146RUN go get github.com/goreleaser/nfpm/cmd/nfpm
You can’t perform that action at this time.
0 commit comments