-2

Im currently checking out containerd. Unfortunately the documentation is pretty sparse and you don’t find much on the Internet about it.

Im wondering if it is possible to create a new container from a Dockerfile or similar, just like docker build would work. The documentation only shows an example where the image is being pulled from a registry.

Id like to do that through the Go client not the ctr command line tool.

Alexander Hörl
  • 578
  • 4
  • 11
  • 24
  • You're asking if something other than Docker is still Docker enough to use a `Dockerfile`? My guess is no since Docker exists and if you're using a `Dockerfile`, you're sort of stuck using Docker. – tadman Mar 21 '21 at 14:50
  • Remember, Docker containers can run in all kinds of non-Docker things, but building them is a Docker-specific process. There's also ways to build non-Docker containers that are compatible if they meet certain criteria. – tadman Mar 21 '21 at 14:51
  • @tadman containerd has been developed alongside of docker. And comtainerd does support pulling docker containers and running them. – Alexander Hörl Mar 21 '21 at 14:52
  • @tadman containerd is just a more low level version of docker. – Alexander Hörl Mar 21 '21 at 14:53
  • I think you misunderstand me. The container *runtime* has been standardized around Docker-type containers, lots of things can run them. The container *build environment* is not as diversified yet. People use Docker to build, but deploy it in all kinds of ways, containerd being one of them. There's lots of ways to build containerd-compatible containers, but if you're using a `Dockerfile`, I think you're stuck using Docker. Nothing else understands those. – tadman Mar 21 '21 at 14:56
  • @tadman I think you misunderstood me too, I don’t want to create a container in containerd that can be shared with docker. I want to create a container with containerd instead of pulling one and then run in with containerd. But maybe this isn’t even possible. – Alexander Hörl Mar 21 '21 at 15:01
  • 1
    Well it might be possible, I don't know for sure, but I'm going to suggest that using a `Dockerfile` to do it isn't possible without Docker. There are other, older ways to build containers than Docker, so a container can be built, but it's going to use some method other than `Dockerfile`. – tadman Mar 21 '21 at 15:16

1 Answers1

-1

This is possible with BuildKit: https://github.com/moby/buildkit#containerd-image-store

Alexander Hörl
  • 578
  • 4
  • 11
  • 24