Skip to content

Commit

Permalink
feat(devcontainer): add krew
Browse files Browse the repository at this point in the history
  • Loading branch information
PrivatePuffin committed Nov 6, 2024
1 parent cc0fea9 commit d27426b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion containers/apps/devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,31 @@ ARG VERSION
ARG CONTAINER_NAME
ARG CONTAINER_VER

# Download and set up the binary
# hadolint ignore=DL3008,DL3015,SC2086,SC2155
RUN \
apk update && \
apk --no-cache update && \
apk --no-cache add \
sshfs && \
rm -rf /var/cache/apk/* /tmp/* /var/tmp/*

# Download and set up the clustertool binary
RUN curl -L "https://github.com/truecharts/public/releases/download/v${VERSION}/clustertool_${VERSION}_linux_amd64.tar.gz" -o /tmp/clustertool.tar.gz \
&& tar -xzvf /tmp/clustertool.tar.gz -C /usr/local/bin \
&& chmod +x /usr/local/bin/clustertool \
&& rm /tmp/clustertool.tar.gz

# Download and set up the krew binary
RUN curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/krew-linux_amd64.tar.gz"
&& tar zxvf "krew-linux_amd64.tar.gz"
&& ./"krew-linux_amd64" install krew
&& rm /tmp/clustertool.tar.gz

ENV PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"

# add pvmounter to kubectl using crew
RUN kubectl krew install pv-mounter

ENTRYPOINT ["clustertool"]
CMD ["--help"]

Expand Down

0 comments on commit d27426b

Please sign in to comment.