-
Notifications
You must be signed in to change notification settings - Fork 39.5k
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
cmd: build minimal docker images for all cmds #1444
Conversation
CONTEXT=$(readlink -f $(dirname ${BASH_SOURCE[0]})/..) | ||
|
||
docker build -t kube-builder ${CONTEXT} | ||
for dir in ${CONTEXT}/cmd/*; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build targets are already defined in hack/config-go.sh (returned by function kube::default_build_targets). As it is now, you won't compile integration but you will have the scheduler.
@proppy We should talk about this stuff if you want to go deeper. This doesn't fix #19. If we just want docker images with our binaries you can do Other things we need to consider:
@josselin-c As part of moving over to |
Updated the description.
Cool!, I didn't know (or remember) that existed. After taking a look at I'd be happy to update
Can you expand on this, I'm not sure I'm parsing it correctly.
I'm interested to run the |
Look a little closer to what is going on. We are building in docker images there. It creates a kube-build image (including the set up for cross compilation) and then copies the binaries back out locally if you are running boot2docker. We do this as not everything will end up in a docker image. (things like I agree that building from scratch would be nice but we need to build/test static images everywhere. That is a orthogonal change. As for taring up binaries -- we want to have a binary release of built executables (including both client and server). We are distributing/building more than just docker images. As for kubelet under docker -- perhaps it makes sense but I'm not sure it is worthwhile yet. It is really our bootstrap that makes sure that we can manage other containers in a kube friendly way. There is no reason that users can't run it outside of docker locally without a whole cluster. |
I did look at this and didn't meant to imply the current approach was bad. I think using
Yes, but we could have both. I'm not advocating for this to be the default way to run the kubelet, just an convenient way for people to run the kubelet in docker. |
I'm going to close this for now without merging as we talked about it on IRC and I want to avoid Yet Another way of building. |
Build the images using context tar injection (see moby/moby#5715) on top of
FROM scratch
.This could be cleaner (and work with the hub!) once moby/moby#8021 is merged.
Note: because
scratch
doesn't havehostname
you have to pass--hostname_overide
to thekubelet
when starting./cc @gbin