git rebase is a very useful construct in source control management, as it allows you to re-apply your changes atop a different branch of the same repository. While this concept transitions perfectly to container management (updating a container could be as easy as a docker rebase), and the Docker client is inspired by the git semantics, Docker has no such feature (in fact, Solomon Hykes used rebase and merge as examples of things "that we don't want"). Currently, zypper-docker works by applying an updated layer on top of an existing image. While this does work quite well, it separates the process of updating the base image and updating all of your derivative images (you need to re-download new packages for each derivative image).

So, this project will be working on implementing something like git rebase for Docker images. There are several issues with this, mainly involving the fact that we are rebasing binaries and not source code, so merge conflicts will probably be quite messy. But it should be possible to implement some form of simple rebase method (which will essentially fall back to docker build in the worst case, which is what you were going to run anyway). By maximising the reuse of the existing image layers, it should be possible to reduce build times quite significantly.

Unfortunately, it seems like there's no nice way of implementing docker rebase without having access to the internal image format of Docker (as docker diff only gives you information on containers and not on images). Further work could be done to see what would be required to do as-close-as-possible live-rebase of a docker container.

Status:

  1. Load Docker image graphs [DONE].
  2. Resolve common-parent and non-common-parent cases [DESIGNED].
  3. Recognise updated layers (using the CMD) [DESIGNED].
  4. Deal with #(nop) [DESIGNED].
  5. Figure out how to nicely do single layer builds [STUCK].

Looking for mad skills in:

docker

This project is part of:

Hack Week 13

Activity

  • over 3 years ago: cyphar liked Docker: Image Rebasing
  • over 3 years ago: cyphar disliked Docker: Image Rebasing
  • over 3 years ago: cschum liked Docker: Image Rebasing
  • over 3 years ago: fanyadan liked Docker: Image Rebasing
  • over 3 years ago: ancorgs liked Docker: Image Rebasing
  • Show History

    Comments

    Be the first to comment!

    Similar Projects

    Make "salt-toaster" available to be used outside SUSE by PSuarezHernandez

    The salt-toaster (https://github.com/openSUSE...