Last active
April 9, 2020 08:30
-
-
Save dsiebel/33c7e21abeb043a38d23d98d7eecf316 to your computer and use it in GitHub Desktop.
A Dockerfile for https://octant.dev/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
OCTANT_IMAGE=dsiebel/octant | |
OCTANT_VERSION=0.11.1 | |
docker build \ | |
--tag ${OCTANT_IMAGE}:${OCTANT_VERSION} \ | |
--build-arg OCTANT_VERSION=${OCTANT_VERSION} \ | |
--file ./octant.Dockerfile \ | |
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:stretch-slim as octant-build | |
WORKDIR / | |
RUN DEBIAN_FRONTEND=noninteractive; \ | |
apt-get update && \ | |
apt-get install \ | |
--auto-remove \ | |
--no-install-recommends \ | |
--no-install-suggests \ | |
--show-upgraded \ | |
--yes \ | |
ca-certificates \ | |
curl | |
ARG OCTANT_VERSION | |
RUN curl -L -O "https://github.com/vmware-tanzu/octant/releases/download/v${OCTANT_VERSION}/octant_${OCTANT_VERSION}_Linux-64bit.tar.gz" \ | |
&& tar -xzf octant_${OCTANT_VERSION}_Linux-64bit.tar.gz \ | |
&& cp octant_${OCTANT_VERSION}_Linux-64bit/octant /octant | |
FROM scratch as octant | |
WORKDIR /tmp | |
COPY --from=octant-build /octant /octant | |
EXPOSE 7777 | |
VOLUME /kubeconfig | |
ENTRYPOINT [ "/octant", \ | |
"--disable-open-browser", \ | |
"--listener-addr", "0.0.0.0:7777" \ | |
"--kubeconfig", "/kubeconfig" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Switching contexts doesn't work right now if the context requires auth. For GKE for example it requires gcloud-sdk which most likely will not be installed where it is on the host system...
Workaround: switch to the context you want to look at, then run octant-docker.