如何修复 Windows 10 docker 中的 apt-get

问题描述 投票:0回答:1

我正在尝试让这段代码在docker中运行,这是我第一次。该代码不是我的,我从 c++ Circle 编译器网站上获取的。

FROM ubuntu:latest

MAINTAINER Sean <[email protected]>

RUN apt-get -y update && apt-get upgrade

RUN apt-get update && \
  apt-get install -y binutils libstdc++-10-dev wget git && \
  wget -P /home https://www.circle-lang.org/debian/build_200.tgz && \
  tar xvf /home/build_200.tgz -C /usr/bin && \
  chmod +x /usr/bin/circle && \
  git clone https://www.github.com/seanbaxter/circle /home/circle_docs

代码抛出以下错误:

--------------------
   3 |     MAINTAINER Sean <[email protected]>
   4 |
   5 | >>> RUN apt-get -y update && apt-get upgrade
   6 |
   7 |     RUN apt-get update && \
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get -y update && apt-get upgrade" did not complete successfully: exit code: 1
docker windows-10
1个回答
0
投票

要修复第 5 行的错误,只需将

-y
移至更新命令:

RUN apt-get update && apt-get -y upgrade

但是,正如 Hans Kilian 之前提到的,这条线可能没有必要。

© www.soinside.com 2019 - 2024. All rights reserved.