-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
31 lines (24 loc) · 1.3 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
ARG suse_bci_base_version
FROM registry.suse.com/bci/bci-base:$suse_bci_base_version AS build
LABEL vendor="digi-lab.io"
ARG arch
ARG kubernetes_release_version
ARG krew_version
WORKDIR /bin
RUN zypper -n install curl tar gzip git jq wget
RUN VERSION=v4.2.0; BINARY=yq_linux_${arch} && \
wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY}.tar.gz -O - |\
tar xz && mv ${BINARY} /usr/bin/yq
RUN set -x && curl -fsSLO https://storage.googleapis.com/kubernetes-release/release/${kubernetes_release_version}/bin/linux/${arch}/kubectl
RUN chmod +x kubectl
RUN set -x && OS="$(uname | tr '[:upper:]' '[:lower:]')" && \
arch="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" && \
krew_version="krew-${OS}_${arch}" && \
echo "Krew: ${krew_version}" && \
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${krew_version}.tar.gz" && \
tar zxvf "${krew_version}.tar.gz" && \
./"${krew_version}" install krew
RUN echo "export PATH=${KREW_ROOT:-$HOME/.krew}/bin:$PATH" >> /root/.bashrc
ENV PATH=/root/.krew:/root/.krew/bin:$PATH
RUN source /root/.bashrc && kubectl krew install slice
RUN curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash