Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dockerfile #70

Merged
merged 1 commit into from
Sep 12, 2023
Merged

Add dockerfile #70

merged 1 commit into from
Sep 12, 2023

Conversation

Yuni-sa
Copy link
Contributor

@Yuni-sa Yuni-sa commented Sep 11, 2023

This commit adds a Dockerfile and .dockerignore to for containerizing the kor CLI tool. #64 #69

example for using the image: docker run --rm -i -v "$KUBECONFIG:/root/.kube/config" kor-image:tag all -n namespace
or instead: docker run --rm -i -v "/path/to/kube/config:/root/.kube/config" kor-image:tag all -n namespace

The image should be pushed to dockerhub and ghcr.io with every release using goreleaser.

I was also thinking about adding to the Dockerfile ENV KUBECONFIG=/kubeconfig making it a bit easier to use the volume: docker run --rm -i -v "/path/to/kube/config:/kubeconfig" kor-image:tag but for now users can just add -e KUBECONFIG=/kubeconfig -v "/path/to/kube/config:/kubeconfig".

@yonahd let me know what you think.

This commit adds a Dockerfile and .dockerignore to for containerizing the kor CLI tool.
@Yuni-sa
Copy link
Contributor Author

Yuni-sa commented Sep 11, 2023

also instructions should be added to readme.md once the image is pushed.

Copy link
Owner

@yonahd yonahd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The if the kubeconfig is mounted it can be passed with the -k flag. So no need to set the env variable.

The MR looks good. I'll add the docker to the release once I create the registry and add credentials

@yonahd yonahd merged commit a4f6f40 into yonahd:main Sep 12, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants