docker - LXC 上的 Docker - rm 文件:注册层失败:处理 tar 文件时出错(退出状态 1):不允许操作
问题描述
我有一个相当简单的 Dockerfile
FROM python:3.6-slim-stretch
COPY files.zip /tmp
RUN \
apt-get update && \
apt-get install -y unzip && \
apt-get -y autoremove && \
apt-get clean && \
mkdir -p /app/data && \
unzip /tmp/files.zip -d /app/data && \
rm -f /tmp/files.zip
在本地一切正常(Ubuntu 18.04,Docker 版本 18.09.5,构建 e8ff056)。但是在 LXC 上(对不起,不知道 LXC 的版本,Docker 版本 18.09.4,使用存储驱动程序 overlay2 构建 d14af54)我得到了
failed to register layer: Error processing tar file(exit status 1):
operation not permitted
当我这样做的时候docker pull myimage:latest
。罪魁祸首是线rm -f /tmp/files.zip
(没有它,我什至可以在 LXC 上拉出图像)。
我尝试设置各种权限,chmod u+rwx,g+rwx,o+rwx /tmp/files.zip
但在 LXC 上,没有该 zip 文件就无法提取图像。
有什么想法吗?
解决方案
推荐阅读
- reactjs - 如何在本机反应中删除导航标题填充和边距?
- testing - Testcafe 不与 Macbook pro 中的浏览器交互
- python - 如何生成范围内的所有数字?在蟒蛇
- python - 如何修复由 Pycharm 中的 Tensorflow 引起的 cudart64_110.dll 错误?
- c++ - 我可以采取什么步骤来修复“Unknown type name 'Node'”的错误?
- wordpress - register_rest_route 总是给出 JSON 输出
- javascript - 如何从 django 将数据从 html 模板传递给 js
- reactjs - 另一种在本地运行 react app 的配置
- git - 尝试推送到远程存储库时出现多个错误
- django - django social auth 不返回用户