gpt4 book ai didi

xamarin - 从Dockerfile安装了Mono的Ubuntu镜像的构建错误

转载 作者:行者123 更新时间:2023-12-02 21:28:35 25 4
gpt4 key购买 nike

我有以下docker文件,我正尝试使用该文件来构建具有mono的Ubuntu镜像。

FROM ubuntu:14.04

MAINTAINER John Smith <John.Smith@gmail.com>

RUN sudo apt-get update

RUN sudo /bin/bash -l -c apt-get install wget

RUN sudo /bin/bash -l -c apt-get http://download.mono-project.com/repo/xamarin.gpg

RUN sudo apt-key add xamarin.gpg

RUN sudo echo "deb http://download.mono-project.com/repo/debian wheezy main" > /etc/apt/sources.list.d/mono-xamarin.list

RUN sudo apt-get update

RUN sudo apt-get install mono-complete

当我运行以下 docker build命令时...
docker build -t="test/mono" .

它生成失败,并显示以下错误消息:
gpg:can't open 'xamaring.gpg': No such file or directory.
2015/05/27 16:11:01 The command [/bin/bash -c sudo apt-key add xamarin.gpg] returned a non-zero code: 2

明显有什么不对吗?

最佳答案

看来您在安装wget后忘了使用wget而不是apt-get,因此“xamaring.gpg”尚未下载,这就是为什么找不到它的原因。

你需要这个:

/bin/bash -l -c "wget http://download.mono-project.com/repo/xamarin.gpg"

关于xamarin - 从Dockerfile安装了Mono的Ubuntu镜像的构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30486444/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com