From c4bdaeb3b4f7505f866c76bec79f3ce840451af0 Mon Sep 17 00:00:00 2001 From: Adar Nimrod Date: Sat, 2 Apr 2022 01:26:47 +0300 Subject: [PATCH] No more go get. It's been deprecated and removed. The alternative is go install but it's not a direct replacement. Specifically, replace directives can't appear in the go.mod file. Kustomize can be installed using go install, so that's fine. RKE and reg can't, so use the GitHub CLI to download the binaries from the latest release. --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index afde0fb..b31af4c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -228,9 +228,6 @@ RUN apt-get update && \ export GOPATH=/usr/local/lib/go && \ export PATH="$GOPATH/bin:$PATH" && \ mkdir "$GOPATH" && \ - go get sigs.k8s.io/kustomize/kustomize/v3 && \ - go get github.com/rancher/rke && \ - go get github.com/genuinetools/reg@v0.16.1 && \ export GO111MODULE=on && \ go install github.com/giantswarm/semver-bump@latest && \ go install github.com/nishanths/license/v5@latest && \ @@ -239,10 +236,15 @@ RUN apt-get update && \ go install github.com/lucagrulla/cw@latest && \ go install github.com/kvz/json2hcl@latest && \ go install github.com/hashicorp/envconsul@latest && \ + go install sigs.k8s.io/kustomize/kustomize/v4@latest && \ wget https://raw.githubusercontent.com/rabbitmq/rabbitmq-server/v3.8.16/deps/rabbitmq_management/bin/rabbitmqadmin -qO /usr/local/bin/rabbitmqadmin && \ chmod +x /usr/local/bin/rabbitmqadmin && \ mkdir /usr/local/share/bfg && \ wget 'https://search.maven.org/remote_content?g=com.madgag&a=bfg&v=LATEST' -qO /usr/local/share/bfg/bfg.jar && \ + gh release download --repo genuinetools/reg --pattern "reg-$(go env GOOS)-$(go env GOARCH)" && \ + install -o root -g root -m 0755 /usr/local/bin/reg reg-* && \ + gh release download --repo rancher/rke --pattern "rke_$(go envGOOS)-$(go env GOARCH)" && \ + install -o root -g root -m 0755 /usr/local/bin/rke rke_* && \ _PIPENV_COMPLETE=bash_source pipenv > /etc/bash_completion.d/pipenv && \ rabbitmqadmin --bash-completion > /etc/bash_completion.d/rabbitmqadmin && \ poetry completions bash > /etc/bash_completion.d/poetry && \ -- GitLab