Update default Docker Engine to Docker CE
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)
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.
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.
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.
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,
Hello @ailispaw, thank you for that!
I have two questions:
- Do you plan to upload the new ISO with the latest docker binary?
- 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)?
-
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. -
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 usesmake -j1internally for most of packages.
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.
Btw, the re-package script is much faster than one from scratch, because of no compiling.
You can create your script to add/remove anything into/from the original one quickly, based on the idea of my Dockerfile.
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.
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)?
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.