AWS批处理容器错误:"ResourceInitializationError no users found"

0

【以下的问题经过翻译处理】 触发批处理作业(Fargate作业队列)时,状态会出现“FAILED”并显示以下错误消息:

Cannotstartcontainererror: ResourceInitializationError: unable to create new container: mount callback failed on /tmp/containerd-mount3975084381: no users found

不幸的是,我在网上找不到类似的错误信息。对于参考,我正在构建的Dockerfile仅包含以下内容:

FROM python:3.8-slim-buster
WORKDIR /app
USER root

COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt

COPY . .

CMD [ "python3", "run.py"]

run.py的内容如下:

print("Python script has run!")

镜像中唯一的其他文件是requirements.txt,其中仅包含一行“requests”。

为了帮助解决问题,我暂时授予了ECS运行角色完整管理员权限,但错误仍然发生(我后来将其改回原来的权限)。

profile picture
专家
已提问 5 个月前29 查看次数
1 回答
0

【以下的回答经过翻译处理】 找到了我的答案!作业定义中的用户设置为 ubuntu,但在 python:3.8-slim-buster 镜像中不可用。我把它改为 root,现在它完美地工作了。

profile picture
专家
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则