docker container中添加PPA失败

浏览:17日期:2023-03-10

问题描述

我在docker container中执行命令add-apt-repository ppa:ubuntu-wine/ppa失败,提示Cannot add PPA: ’ppa:ppaname/ppa’.Please check that the PPA name or format is correct.

但是在host上执行同样的命令就是成功的。

根据google的多个方案,我试过先安装下面这些软件apt-get install python-software-properties,apt-get install software-properties-common,apt-get install --reinstall ca-certificates,仍然没有解决问题。

host的系统是ubuntu 14.04,64位,container的image也是基于docker官方的ubuntu14.04的镜像制作的。

不知道有人碰到过类似的问题吗?请指点下。谢谢。

问题解答

回答1:

我大概就做了这么几件事

sudo docker run -i -t ubuntu:14.04 /bin/bash

然后在container里面

apt-get updateapt-get install software-properties-commonadd-apt-repository ppa:ubuntu-wine/ppa

ppa添加成功

相关文章: