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

How to use crun with docker? #37

Closed
mviereck opened this issue Apr 14, 2019 · 2 comments
Closed

How to use crun with docker? #37

mviereck opened this issue Apr 14, 2019 · 2 comments

Comments

@mviereck
Copy link

I would like to try crun as docker runtime. How can I set it up to use it with docker run option --runtime=crun?

I currently tried kata with --runtime=kata-runtime and find it quite interesting. It would be nice to try crun, too.

@giuseppe
Copy link
Member

are you using a config file (--config-file) for configuring Docker?

I've configured it passing --add-runtime on the dockerd command line. To do so I modified the systemd service file adding --runtime=crun=/usr/local/bin/crun.

After that, you can either configure crun as the default runtime for Docker via --default-runtime=crun or you can specify it for each container with docker run ... --runtime=crun ...

@mviereck
Copy link
Author

mviereck commented Apr 14, 2019

I did not thought it could be that easy, thank you!

I have configured /etc/docker/daemon.json, providing runc, kata-runtime and now also crun:

$ cat /etc/docker/daemon.json 
{
  "default-runtime": "runc",
  "runtimes": {
    "kata-runtime": {
      "path": "/opt/kata/bin/kata-runtime",
      "runtimeArgs": [
              "--kata-config /etc/kata/configuration.toml"
      ]
    },
    "crun": {
      "path": "/usr/local/bin/crun"
    }
  }
}

I just had a successfull first test run with --runtime=crun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants