[英]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.