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 hackers with the skills:

docker

This project is part of:

Hack Week 13

Activity

  • almost 9 years ago: cyphar liked this project.
  • almost 9 years ago: cyphar disliked this project.
  • almost 9 years ago: cschum liked this project.
  • about 9 years ago: fanyadan liked this project.
  • about 9 years ago: ancorgs liked this project.
  • about 9 years ago: cyphar liked this project.
  • about 9 years ago: cyphar started this project.
  • about 9 years ago: cyphar added keyword "docker" to this project.
  • about 9 years ago: cyphar originated this project.

  • Comments

    Be the first to comment!

    Similar Projects

    Migrate from Docker to Podman by tjyrinki_suse

    Description

    I'd like to continue my former work on containerization of several domains on a single server by changing from Docker containers to Podman containers. That will need an OS upgrade as well as Podman is not available in that old server version.

    Goals

    • Update OS.
    • Migrate from Docker to Podman.
    • Keep everything functional, including the existing "meanwhile done" additional Docker container that is actually being used already.
    • Keep everything at least as secure as currently. One of the reasons of having the containers is to isolate risks related to services open to public Internet.
    • Try to enable the Podman use in production.
    • At minimum, learn about all of these topics.
    • Optionally, improve Ansible side of things as well...

    Resources

    A search engine is one's friend. Migrating from Docker to Podman, and from docker-compose to podman-compose.