Can a docker image based on Ubuntu run in Redhat?

后端 未结 2 2075
悲哀的现实
悲哀的现实 2021-02-19 20:58

Read some PPTs, it seems that one container can run on different linux vendors. Is is true?

2条回答
  •  春和景丽
    2021-02-19 21:20

    Yes. That's the main idea of docker.

    It creates a "static container" in a chrooted env that is able to run on any linux because all the needed user-land dependencies are included in the image.

    Since linux (the kernel) maintains a backward compatibility on system calls and their call-schemes, the idea can work across versions and even different distributions of Linux.

    Of course, the binary architecture (say amd64) needs to be the same on the source and target system.

提交回复
热议问题