Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker-compatible CLI #566

Closed
awakecoding opened this issue Sep 1, 2021 · 6 comments
Closed

Docker-compatible CLI #566

awakecoding opened this issue Sep 1, 2021 · 6 comments
Assignees
Labels
kind/enhancement New feature or request
Milestone

Comments

@awakecoding
Copy link

I would like to use Rancher Desktop as a replacement of Docker Desktop - it would need a Docker-compatible CLI using containerd, such that it could correctly support both Windows and Linux containers. Microsoft is now using containerd in Azure Kubernetes Services, but Docker for Windows is not yet using it. The closest Docker CLI replacement that leverages containerd is nerdctl, but it would need more work to reach feature parity with Docker Desktop.

With news that Docker Desktop should now be paid for a lot of developers, it only becomes reasonable that we shop for alternatives. I don't necessarily mind if it's Docker Desktop or Rancher Desktop, but I would buy the one with support for containerd on Windows if it were available. There is definitely a business case for this IMO.

@mattfarina
Copy link
Contributor

@awakecoding Thank you for filing this issue. I've seen similar requests in a couple other places, too. We will be taking some time this week to look into this and, hopefully, figure out a plan.

@nejch
Copy link

nejch commented Sep 1, 2021

#255 seems to also be related to this although smaller in scope.

@mattfarina
Copy link
Contributor

I think this will work best as broken into two separate issues to tackle. First, there is getting a generally docker compatible CLI. Second, windows container support. The reason for handling them separately is that we can tackle the docker compatible one more quickly. Some of the underlying tooling isn't ready for Windows containers, yet. It will also require us to do work outside the CLI around Windows versions (not all of them can do windows containers).

@awakecoding
Copy link
Author

I think this will work best as broken into two separate issues to tackle. First, there is getting a generally docker compatible CLI. Second, windows container support. The reason for handling them separately is that we can tackle the docker compatible one more quickly. Some of the underlying tooling isn't ready for Windows containers, yet. It will also require us to do work outside the CLI around Windows versions (not all of them can do windows containers).

I think it is fair to break it in two separate milestones, where the first one is to provide a Docker-compatible CLI for Linux containers, and the second one brings support for Windows containers, but the plan should be to support both Linux and Windows containers at the same time on Windows, with proper WSL2 integration. I agree that the Windows integration part adds a lot more work, but it would be necessary to become a proper replacement for Docker Desktop on Windows. I should also clarify that the Windows support is only needed on a Windows host, non-Windows hosts would be a nice-to-have feature.

@AkihiroSuda
Copy link

Linking a nerdctl PR to support Windows containers. containerd/nerdctl#197

Help wanted to move this forward.

@gaktive gaktive added the kind/enhancement New feature or request label Sep 2, 2021
@mattfarina mattfarina added this to the v0.5.0 milestone Sep 3, 2021
mattfarina added a commit to mattfarina/rd that referenced this issue Sep 8, 2021
This includes:
- nerdctl as a CLI that can be added to the path like the other
  tools.
- An updated version of alpine-lima that includes nerdctl and the
  other binaries it needs.
- ~ is mounted so that nerdctl build can access the files to build.
  nerdctl build will not work for locations outside of ~.
- A .profile file exporting an environment variable to tell nerdctl
  where the containerd socket is as k3s puts it in a non-standard
  location.

Note, in the future we should look at taring up the build directory
and sending it to the VM. That would be a more substancial effort
to accomplish.

Related to rancher-sandbox#566

Thanks to Jan for all the pointers in creating this and the alpine-lima
build.

Signed-off-by: Matt Farina <[email protected]>
mattfarina added a commit to mattfarina/rd that referenced this issue Sep 10, 2021
This includes:
- nerdctl as a CLI that can be added to the path like the other
  tools.
- An updated version of alpine-lima that includes nerdctl and the
  other binaries it needs.
- ~ is mounted so that nerdctl build can access the files to build.
  nerdctl build will not work for locations outside of ~.
- A .profile file exporting an environment variable to tell nerdctl
  where the containerd socket is as k3s puts it in a non-standard
  location.

Note, in the future we should look at taring up the build directory
and sending it to the VM. That would be a more substancial effort
to accomplish.

Related to rancher-sandbox#566

Thanks to Jan for all the pointers in creating this and the alpine-lima
build.

Signed-off-by: Matt Farina <[email protected]>
@mook-as mook-as mentioned this issue Sep 11, 2021
2 tasks
mattfarina added a commit to mattfarina/rd that referenced this issue Sep 15, 2021
This includes:
- nerdctl as a CLI that can be added to the path like the other
  tools.
- An updated version of alpine-lima that includes nerdctl and the
  other binaries it needs.
- ~ is mounted so that nerdctl build can access the files to build.
  nerdctl build will not work for locations outside of ~.
- A .profile file exporting an environment variable to tell nerdctl
  where the containerd socket is as k3s puts it in a non-standard
  location.

Note, in the future we should look at taring up the build directory
and sending it to the VM. That would be a more substancial effort
to accomplish.

Related to rancher-sandbox#566

Thanks to Jan for all the pointers in creating this and the alpine-lima
build.

Signed-off-by: Matt Farina <[email protected]>
mattfarina added a commit to mattfarina/rd that referenced this issue Sep 17, 2021
This enables the use of priviledged ports and makes content
available on the machines IP.

Part of rancher-sandbox#566

Signed-off-by: Matt Farina <[email protected]>
@mattfarina mattfarina modified the milestones: v0.5.0, v0.7.0 Sep 27, 2021
@mattfarina
Copy link
Contributor

In the 0.5 release, which will drop soon, we have added nerdctl. This is a docker compatible-ish CLI to work with containerd. The "-ish" is because there are some commands and flags that are not supported but are in the Docker CLI. Things like nerdctl build and nerdctl run mostly work as expected.

This is just a start to our container cli/build/run.

The next step, which I think more suits this issue, is detailed in #673. It is to provide the ability to have docker cli/moby as an alternative to nerdctl/containerd. Note, under the hood moby uses containerd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants