Skip to content

On the decision to make a pure-buildkit docker package #1856

Closed

Description

@shykes

I wanted to address the decision to 1) make universe.dagger.io/docker a pure buildkit client, instead of a docker engine client; 2) move the traditional docker engine client to an obscure sub-package; 3) encourage the use of the former over the latter.

I know that it is not an intuitive decision: it's definitely a tradeoff. But I think it's the right one when you look at the current state and trajectory of the Docker platform.

In short: docker engine is now the legacy API, and buildkit is its successor.

  • Most of its production clients are wrapper tools, using it as a shim to containerd. This shim has recently been deprecated in Kubernetes/CRI and will eventually be deprecated by all infrastructure software. This is encouraged by Docker, after all they created containerd in the first place, for this purpose.

  • Its most used development clients is docker-compose which could, and I believe one day will, target buildkit instead of docker engine. I believe docker-compose build already does this. The buildkit team intends to become a feature-complete container runtime for development workloads, and I have no doubt they will pull it off (they largely already have)

  • Docker build & buildx of course uses buildkit entirely.

I believe this split aligns us with the future of Docker rather than its past. It will both help them realize this transition, and help us make Dagger the best third-party client on the market for new dockerd aka buildkitd :)

Activity

  1. grouville commented on Mar 25, 2022

    @grouville
    Member

    I really like the idea and totally agree with you. The biggest blocker atm is: #1844, for which the absence of a docker.#Client package will force users to use the bash.#Run package with the docker-cli binary installed, meaning that people will be free / feel the need for such package pretty soon

    Do we want to kind of control this behavior ? Shall @helderco make it his own package that people can download to keep the docker.#Client clean ?

    P.S: you already answered here 😇 (#1855 (comment))

  2. helderco commented on Mar 25, 2022

    @helderco
    Contributor

    Thanks for the context @shykes, makes perfect sense to me!

  3. helderco commented on Mar 25, 2022

    @helderco
    Contributor

    I really like the subpackage name legacy as an alternative to client. It conveys the intention more clearly (see #1856) and is more accurate since technically both packages are clients - just not to the same API.

    Originally posted by @shykes in #1855 (comment) (emphasis mine)

    Makes sense, I have just one small reservation on legacy. The Particubes use-case that @grouville is working on uses #Load. My concern is having featured in our docs something that's using a "legacy" API (i.e., legacy.#Load), that conflicts with our intention to discourage its use.

    It could also be docker/engine, with engine.#Load and engine.#Run. Not to confuse with the dagger engine in early Europa, but about the docker engine. It tracks with the terminology to "run in a local or remote engine". Then, when our own buildkit client is more full featured, in a future version we could rename engine to legacy.

  4. helderco commented on Mar 25, 2022

    @helderco
    Contributor

    Just to record, we decided on universe.dagger.io/docker/cli.

  5. locked and limited conversation to collaborators on Mar 27, 2022
  6. converted this issue into a discussion #1874 on Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions