mirror of
https://github.com/rancher/cli.git
synced 2026-02-05 09:48:36 +01:00
Problem: The cli is using an old go version It does not use all the validation tools rancher/rancher uses Solution: Update to go version 1.12.9 Include goimports for validation
21 lines
781 B
Docker
21 lines
781 B
Docker
FROM golang:1.12.9
|
|
RUN apt-get update && \
|
|
apt-get install -y xz-utils zip rsync
|
|
|
|
RUN go get -u golang.org/x/lint/golint && \
|
|
go get -d golang.org/x/tools/cmd/goimports && \
|
|
# This needs to be kept up to date with rancher/types
|
|
git -C /go/src/golang.org/x/tools/cmd/goimports checkout -b release-branch.go1.12 origin/release-branch.go1.12 && \
|
|
go install golang.org/x/tools/cmd/goimports
|
|
|
|
RUN curl -sL https://get.docker.com/builds/Linux/x86_64/docker-1.9.1 > /usr/bin/docker && \
|
|
chmod +x /usr/bin/docker
|
|
ENV PATH /go/bin:$PATH
|
|
ENV DAPPER_SOURCE /go/src/github.com/rancher/cli
|
|
ENV DAPPER_OUTPUT bin build/bin dist
|
|
ENV DAPPER_DOCKER_SOCKET true
|
|
ENV DAPPER_ENV TAG REPO GOOS CROSS DRONE_TAG
|
|
WORKDIR ${DAPPER_SOURCE}
|
|
ENTRYPOINT ["./scripts/entry"]
|
|
CMD ["ci"]
|