目前我的dockerfile只是:
FROM ubuntu:latest
RUN apt-get update
RUN apt install software-properties-common -y
但是,在构建停靠文件并运行步骤apt install software-properties-common -y
时,消息中出现以下错误:
#0 41.07 Setting up python3.10-minimal (3.10.6-1~22.04.2) ...
#0 41.16 [Errno 13] Permission denied: '/usr/lib/python3.10/__pycache__/__future__.cpython-310.pyc.139723958934016'dpkg: error processing package python3.10-minimal (--configure):
#0 41.16 installed python3.10-minimal package post-installation script subprocess returned error exit status 1
#0 41.17 Errors were encountered while processing:
#0 41.17 python3.10-minimal
#0 41.18 E: Sub-process /usr/bin/dpkg returned an error code (1)
------
failed to solve: executor failed running [/bin/sh -c apt install software-properties-common -y]: exit code: 100
我想知道你们是否可以帮我解决这个错误,以便完成构建的dockerfile?
1条答案
按热度按时间fslejnso1#
原来我有
snap
版本的Docker,这导致了错误,但当我从https://docs.docker.com/engine/install/ubuntu/下载apt
版本的Docker时,没有错误。