♻️ Update Stern to use stern/stern; get it from the GHCR image; update curl commands

This commit is contained in:
Jérôme Petazzoni
2021-04-22 10:04:32 +02:00
parent 254ec46bad
commit ffe5f065ef
+15 -17
View File
@@ -3,11 +3,10 @@ RUN apk add git
RUN go get -u github.com/simeji/jid/cmd/jid
FROM alpine
ENV \
COMPOSE_VERSION=1.26.2 \
HELM_VERSION=3.3.0 \
KUBECTL_VERSION=1.18.8 \
SHIP_VERSION=0.51.3 \
STERN_VERSION=1.11.0
COMPOSE_VERSION=1.29.1 \
HELM_VERSION=3.5.4 \
KUBECTL_VERSION=1.21.0 \
SHIP_VERSION=0.51.3
## Alpine base ##
ENV COMPLETIONS=/usr/share/bash-completion/completions
RUN apk add bash bash-completion curl git jq libintl ncurses openssl tmux vim apache2-utils
@@ -17,22 +16,21 @@ RUN sed -i s,/bin/ash,/bin/bash, /etc/passwd
#RUN apt-get update \
# && apt-get install -y curl git jq vim apache2-utils
## Install a bunch of binaries
RUN curl -L -o /usr/local/bin/docker-compose https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-Linux-x86_64 \
RUN curl -fsSL -o /usr/local/bin/docker-compose https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-Linux-x86_64 \
&& chmod +x /usr/local/bin/docker-compose
RUN curl -L -o /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl \
RUN curl -fsSL -o /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl \
&& chmod +x /usr/local/bin/kubectl
RUN kubectl completion bash > $COMPLETIONS/kubectl.bash
RUN curl -L -o /usr/local/bin/stern https://github.com/stern/stern/releases/download/${STERN_VERSION}/stern_linux_amd64 \
&& chmod +x /usr/local/bin/stern
COPY --from=ghcr.io/stern/stern:latest /usr/local/bin/stern /usr/local/bin/stern
RUN stern --completion bash > $COMPLETIONS/stern.bash
RUN curl -L https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz \
RUN curl -fsSL https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz \
| tar zx -C /usr/local/bin --strip-components=1 linux-amd64/helm
RUN helm completion bash > $COMPLETIONS/helm.bash
RUN curl -L https://github.com/replicatedhq/ship/releases/download/v${SHIP_VERSION}/ship_${SHIP_VERSION}_linux_amd64.tar.gz \
RUN curl -fsSL https://github.com/replicatedhq/ship/releases/download/v${SHIP_VERSION}/ship_${SHIP_VERSION}_linux_amd64.tar.gz \
| tar zx -C /usr/local/bin ship
# This is embarrassing, but I can't get httping to compile correctly with musl.
# It reports negative times. So, I found this random binary here. Shrug.
RUN curl -L https://github.com/static-linux/static-binaries-i386/raw/4266c69990ae11315bad7b928f85b6c8e605ef14/httping-2.4.tar.gz \
RUN curl -fsSL https://github.com/static-linux/static-binaries-i386/raw/4266c69990ae11315bad7b928f85b6c8e605ef14/httping-2.4.tar.gz \
| tar zx -C /usr/local/bin --strip-components=1 httping-2.4/httping
RUN cd /tmp \
&& git clone https://github.com/ahmetb/kubectx \
@@ -53,16 +51,16 @@ RUN mkdir /tmp/krew \
&& cd \
&& rm -rf /tmp/krew \
&& echo export 'PATH=$HOME/.krew/bin:$PATH' >> .bashrc
RUN curl -sSL https://github.com/derailed/k9s/releases/latest/download/k9s_$(uname -s)_$(uname -m).tar.gz \
RUN curl -fsSL https://github.com/derailed/k9s/releases/latest/download/k9s_$(uname -s)_$(uname -m).tar.gz \
| tar -zxvf- -C /usr/local/bin k9s
RUN curl -sSL https://github.com/derailed/popeye/releases/latest/download/popeye_$(uname -s)_$(uname -m).tar.gz \
RUN curl -fsSL https://github.com/derailed/popeye/releases/latest/download/popeye_$(uname -s)_$(uname -m).tar.gz \
| tar -zxvf- -C /usr/local/bin popeye
COPY --from=tiltdev/tilt /usr/local/bin/tilt /usr/local/bin/tilt
RUN curl -Lo /usr/local/bin/skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 \
RUN curl -fsSLo /usr/local/bin/skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 \
&& chmod +x /usr/local/bin/skaffold
RUN curl -Lo /usr/local/bin/kompose https://github.com/kubernetes/kompose/releases/latest/download/kompose-linux-amd64 \
RUN curl -fsSLo /usr/local/bin/kompose https://github.com/kubernetes/kompose/releases/latest/download/kompose-linux-amd64 \
&& chmod +x /usr/local/bin/kompose
RUN curl -Lo /usr/local/bin/kubeseal https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.13.1/kubeseal-linux-amd64 \
RUN curl -fsSLo /usr/local/bin/kubeseal https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.13.1/kubeseal-linux-amd64 \
&& chmod +x /usr/local/bin/kubeseal
RUN kubectl config set-context kubernetes --namespace=default \
&& kubectl config use-context kubernetes