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

Trim kic base image #6152

Closed
medyagh opened this issue Dec 23, 2019 · 3 comments · Fixed by #6478
Closed

Trim kic base image #6152

medyagh opened this issue Dec 23, 2019 · 3 comments · Fixed by #6478
Assignees
Labels
co/docker-driver Issues related to kubernetes in container help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@medyagh
Copy link
Member

medyagh commented Dec 23, 2019

as seen in this PR #6151
Currently KIC base image is based on kindest/node:v1.16.2

The following has to be done :

  • Delete all the images inside the container (600MB)

I tried to do

crictl images -q | xargs -n 1 crictl rmi 2>/dev/null

in Dockerfile but however for that containerd needs to be up and running which during docker build image it is not !

so I need help with that.

@medyagh medyagh added co/docker-driver Issues related to kubernetes in container help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Dec 23, 2019
@afbjorklund
Copy link
Collaborator

To actually make the image smaller, you have to avoid the layer that adds them in the first place.
This might require going back to the Dockerfile that KIND is using, and forking from there instead...

https://github.com/kubernetes-sigs/kind/blob/master/pkg/build/node/node.go
https://github.com/kubernetes-sigs/kind/tree/master/images/base

# start from ubuntu 19.10, this image is reasonably small as a starting point
# for a kubernetes node image, it doesn't contain much we don't need
FROM ubuntu:19.10

@medyagh
Copy link
Member Author

medyagh commented Dec 26, 2019

@afbjorklund that is the real solution ! however the build process seemed to be longer than I liked to.

I meant this issue as a quick win, ( just go inside the image and delete anything kind related)

I would be happy to close this issue, if anyone wants to do it from scratch.

@tstromberg tstromberg added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/backlog Higher priority than priority/awaiting-more-evidence. labels Jan 8, 2020
@medyagh
Copy link
Member Author

medyagh commented Feb 4, 2020

this issue was closed by the PR #6478

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-driver Issues related to kubernetes in container help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants