![](/img/trans.png)
[英]How to install apt-get when building docker image from pytorch/manylinux-cpu base image?
[英]apt-get install fails when building a docker image
我正在尝试构建一个Dockerfile:
# Dockerfile
FROM ubuntu
RUN apt-get update && \
apt-get install git
但失败并显示错误
ERROR: Service 'client' failed to build: The command '/bin/sh -c apt-get update && apt-get install git' returned a non-zero code: 1
我做错了什么?
对不起,我很傻。 我只需要在apt-get install
添加-y
选项即可。
# Dockerfile
FROM ubuntu
RUN apt-get update && \
apt-get install -y git
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.