kata-containers / runtime

Kata Containers version 1.x runtime (for version 2.x see https://github.com/kata-containers/kata-containers).
https://katacontainers.io/
Apache License 2.0
2.1k stars 377 forks source link

cli: the default hostname should not be "runc" #3157

Closed LiangZhou-CTY closed 3 years ago

LiangZhou-CTY commented 3 years ago

When use "kata-runtime spec" to generate config.json, we see that the default hostname is "runc", which is not correct.

I understand that it's caused by the call chain spec.go -> specconv.Example(), which is from runc package, but anyway the default hostname of kata container should not be "runc". I think "kata" is more proper for the default hostname.

Use the commands below can expose this issue:

mkdir rootfs
docker export $(docker create busybox) | tar -xf - -C rootfs
kata-runtime spec
kata-runtime run busybox
/ # hostname
runc
LiangZhou-CTY commented 3 years ago

I'm going to work on it.