-
-
Notifications
You must be signed in to change notification settings - Fork 141
/
Dockerfile.dev
41 lines (28 loc) · 1.78 KB
/
Dockerfile.dev
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
32
33
34
35
36
37
38
39
40
41
FROM alpine:3.20.3
RUN apk update \
&& apk add --update --no-cache gcc gmp-dev libevent-static musl-dev pcre-dev pcre2-dev libxml2-dev \
libxml2-static openssl-dev openssl-libs-static tzdata yaml-static zlib-static xz-static \
make git autoconf automake libtool patch libssh2-static libssh2-dev crystal shards \
curl docker zsh bash openssl k9s shadow go envsubst util-linux \
gcc g++ libc-dev libxml2-dev openssl-dev yaml-dev zlib-dev crystal openssh-client
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/$(uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')/kubectl" && chmod +x ./kubectl && mv ./kubectl /usr/local/bin/kubectl
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" \
&& git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
RUN set -x; cd "$(mktemp -d)" \
&& 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="krew-${OS}_${ARCH}" \
&& curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" \
&& tar zxvf "${KREW}.tar.gz" \
&& ./"${KREW}" install krew \
&& PATH="$HOME/.krew/bin:$PATH" kubectl krew install ctx \
&& PATH="$HOME/.krew/bin:$PATH" kubectl krew install ns
RUN curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
ENV GOPATH=/root/go
RUN mkdir -p $GOPATH/bin
RUN go install github.com/stern/stern@v1.30.0
SHELL ["/bin/zsh", "-c"]
RUN echo '/bin/zsh' | chsh `whoami`
RUN rm /root/.zshrc && ln -s /home/app/hetzner-k3s/.zshrc /root/.zshrc
ENV DEVCONTAINER=true
CMD ["tail", "-f", "/dev/null"]