我创建了 linux ubuntu 容器,我厌倦了运行 python 脚本。
但它引发了这个错误:
<frozen importlib._bootstrap>:228: RuntimeWarning: Linux supports fsync/fdsync with io_submit since 4.18 but current kernel 4.15.0-55-generic doesn't support it. Related calls will have no effect.
如何更新 docker 容器内的 ubuntu 内核?有dockerfile:
FROM ubuntu:21.04
RUN apt-get update -y
RUN apt-get upgrade -y
RUN apt-get dist-upgrade -y
RUN apt-get install python3.9 -y
RUN apt-get install python3-pip -y
最佳答案
您无法在 docker 容器内升级内核 - 重点
与虚拟化相反,使用 Docker 容器的原因在于你
使用与底层操作系统相同的内核。你必须升级
你的操作系统内核来解决这个问题。
关于linux - Docker Linux 容器内核更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66413051/