linux - Docker Linux 容器内核更新
问题描述
我创建了 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 容器的全部意义在于您使用与底层操作系统相同的内核。您必须升级操作系统内核才能解决此问题。
推荐阅读
- facebook - 调用 facebook 营销 api /insights 端点为沙盒营销帐户返回一个空数组 data []
- python - 如何检查格式日期python
- python - 正则表达式 - 从末尾开始的斜线之间的第二次出现
- python - 您如何处理时间序列分析中的零点?
- visual-studio - 如何在 Visual Studio(2019 或更高版本)中从 .vscode/tasks.json 运行任务
- php - 从 WooCommerce 订阅仪表板中删除特定用户角色的操作按钮
- reactjs - 如何在 MERN 中使用 params 发布和获取数据
- c# - 使用oledb将数据导出到excel
- javascript - JS - 重复数组项并在循环中重复更改值
- ros - 如何修改 Gazebo 插件,使其不仅适用于世界文件,还适用于 URDF 文件?