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

Update default Docker Engine to Docker CE #74

Open
imjching opened this issue Apr 15, 2018 · 12 comments
Open

Update default Docker Engine to Docker CE #74

imjching opened this issue Apr 15, 2018 · 12 comments

Comments

@imjching
Copy link

It seems like the default Docker Engine version is 1.10.3.

https://github.com/bargees/barge-os/blob/master/patches/0001-docker-engine-use-v1.10.3.patch#L48

The default docker version is not compatible with newer docker clients, and hence I'll need to call sudo /etc/init.d/docker restart latest every time I create a new VM to update the docker version.

Is there any reason why we're still using 1.10.3 as the default?

The latest version for CE is 18.03.0-ce. (https://docs.docker.com/release-notes/docker-ce/#stable-releases)

@ailispaw
Copy link
Member

The reason is that I would like to keep Barge small as possible.
It's one of main goals of this project.
The current Docker contains several binaries, and it's so big and complicated.

I know that it is not a good reason for you...
I have been thinking about it over one year, but still thinking.
Sorry that it would not happen any soon.

@imjching
Copy link
Author

Thank you! No worries about that. I guess the only workaround for now is to create a base data image with the updated docker version and make copies of that image whenever new VMs are created.

@ailispaw
Copy link
Member

Thank you for your understanding.

I might be able to create a script to re-package an ISO or a Vagrant box with the latest Docker.
It sounds good to me for now, too.

@ailispaw
Copy link
Member

ailispaw commented May 7, 2018

Hi @imjching ,

I created a Dockerfile to re-package a Barge ISO with the latest docker binary.
I hope that this idea helps you. #78
Best regards,

@imjching
Copy link
Author

imjching commented May 7, 2018

Hello @ailispaw, thank you for that!

I have two questions:

  1. Do you plan to upload the new ISO with the latest docker binary?
  2. What is a reasonable amount of time to build barge? (Ref: https://github.com/bargees/barge-os/blob/master/docs/build.md#building) Would you recommend passing in the number of cores here: https://github.com/bargees/barge-os/blob/master/scripts/build.sh#L9 (e.g. make -j16)?

@ailispaw
Copy link
Member

ailispaw commented May 7, 2018

  1. Do you plan to upload the new ISO with the latest docker binary?
    I'm not sure to upload it regularly for now, but I can upload it for you to test this time.

  2. What is a reasonable amount of time to build barge?
    It depends on a machine performance and with/without cache.
    On my macbook air mid 2012 (2 GHz Intel Core i7, 8 GB 1600 MHz DDR3, SSD), about 1 hour without cache (from scratch) and about 30min to rebuild it with cache.
    Would you recommend passing in the number of cores here?
    I'm not sure, but buildroot uses make -j1 internally for most of packages.

@ailispaw
Copy link
Member

ailispaw commented May 7, 2018

Here it is.
https://github.com/bargees/barge-os/releases/tag/barge-2.8.2-x

It's about double in size from the original one.

@ailispaw
Copy link
Member

ailispaw commented May 7, 2018

Btw, the re-package script is much faster than one from scratch, because of no compiling.

@ailispaw
Copy link
Member

ailispaw commented May 7, 2018

You can create your script to add/remove anything into/from the original one quickly, based on the idea of my Dockerfile.

@ailispaw
Copy link
Member

ailispaw commented May 7, 2018

Actually this idea is originally from https://github.com/bargees/barge-packer/tree/master/virtualbox/iso and https://github.com/bargees/barge-packer/tree/master/hyperv/iso.

@imjching
Copy link
Author

imjching commented May 7, 2018

Ah I see. That's right. I tested that and it took about 2-3 minutes. The new ISO works perfectly.

When do you know you need to call make oldconfig to recompile?

It seems like https://github.com/bargees/barge-packer/blob/master/hyperv/iso/Dockerfile#L16 just copies the init.d script for hyperv (which is very similar to what we're doing here for docker), but we're still calling make oldconfig in hyperv. Why are we doing that in hyperv, but not for our current situation (updating docker)?

@ailispaw
Copy link
Member

ailispaw commented May 7, 2018

Because we don't need to install or compile Linux kernel in this case to just update docker.

If you need something from/with kernel objects, source codes or include files, you may need to make oldconfig with the Linux kernel.

hv_kvp_daemon is from the Linux kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants