Skip to content

Commit

Permalink
makefile and readme
Browse files Browse the repository at this point in the history
changed direct mount to -v
  • Loading branch information
Piotr Zaniewski committed Feb 11, 2020
1 parent 3458de7 commit d36e9d7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@ IMAGE?=piotrzan/kubectl-comp:zsh
#piotrzan/kubectl-comp:zsh
#piotrzan/kubectl-comp

.PHONY: all run-detatch-zsh run-zsh run-detatch-bash run-bash copy attach zsh-run bash-run
.PHONY: all run-detatch-zsh run-zsh run-detatch-bash run-bash copy attach zsh-run bash-run run-with-mount

all: zsh-run
default: run-with-mount

run-with-mount:
ifeq ($(OS),Windows_NT)
docker run --network=host --name=kubectl-host -v ${USERPROFILE}/.kube:/root/.kube --rm -it $(IMAGE)
else
docker run --network=host --name=kubectl-host -v /root/.kube:/root/.kube --rm -it $(IMAGE)
endif

run-detatch-zsh:
docker run -d --network=host --name=kubectl-host --rm -it $(IMAGE)

run-zsh:
docker run --network=host --name=kubectl-host --rm -it $(IMAGE)
docker run --network=host --name=kubectl-host

copy:
kubectl config view --raw > config
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ There are two images, one simple image with *bash* shell containing:
- useful aliases

Use this image if you want to quickly check and explore Kubernetes cluster without investing too much time.
This image is optimized for size performance and is based on ``Apline`` base image.
This image is optimized for size performance and is based on ``Apline`` base image and is **16 MB** compressed size.

And one is a fancy image for *zsh* with more tools preinstalled:

Expand All @@ -26,7 +26,7 @@ And one is a fancy image for *zsh* with more tools preinstalled:
- useful aliases

Use this image if you want to monitor and develop for Kubernetes. This is my default image with all favourite tools and settings.
This image is optimized for usability and is based on ``Ubuntu`` base image.
This image is optimized for usability and is based on ``Ubuntu`` base image and is **168 MB** compressed size.

## How to use

Expand Down Expand Up @@ -83,7 +83,7 @@ ZSH container will be ran by default.

### Linux Example

Below is also the default for `make` command.
By default `make` command will run `zsh` container with direct mount on the *($home)/.kube directory*.

**Run contianer with passthrough to local network**

Expand Down

0 comments on commit d36e9d7

Please sign in to comment.