barge-os icon indicating copy to clipboard operation
barge-os copied to clipboard

Update default Docker Engine to Docker CE

Open imjching opened this issue 8 years ago • 12 comments

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)

imjching avatar Apr 15 '18 04:04 imjching

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.

ailispaw avatar Apr 15 '18 05:04 ailispaw

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.

imjching avatar Apr 15 '18 05:04 imjching

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 avatar Apr 15 '18 05:04 ailispaw

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,

ailispaw avatar May 07 '18 22:05 ailispaw

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)?

imjching avatar May 07 '18 23:05 imjching

  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 avatar May 07 '18 23:05 ailispaw

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 avatar May 07 '18 23:05 ailispaw

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

ailispaw avatar May 07 '18 23:05 ailispaw

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

ailispaw avatar May 07 '18 23:05 ailispaw

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.

ailispaw avatar May 07 '18 23:05 ailispaw

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)?

imjching avatar May 07 '18 23:05 imjching

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.

ailispaw avatar May 07 '18 23:05 ailispaw