Ubuntu 在Docker容器中添加PPA失败

Ubuntu 在Docker容器中添加PPA失败,ubuntu,docker,apt,Ubuntu,Docker,Apt,我在docker容器中运行了添加apt存储库ppa:UbuntuWine/ppa,但失败了,注意到: Cannot add PPA: 'ppa:ppaname/ppa'. Please check that the PPA name or format is crrect. 但是它在主机上起作用了 在谷歌搜索了很多之后,我尝试了以下方法: apt-get install python-software-properties apt-get install software-properties

我在docker容器中运行了添加apt存储库ppa:UbuntuWine/ppa,但失败了,注意到:

Cannot add PPA: 'ppa:ppaname/ppa'.
Please check that the PPA name or format is crrect.
但是它在主机上起作用了

在谷歌搜索了很多之后,我尝试了以下方法:

apt-get install python-software-properties
apt-get install software-properties-common
apt-get install --reinstall ca-certificates
但没有起作用

主机上的系统是ubuntu 14.04,64位

容器的图像基于DOCKER HUB的Ubuntu14.04


有人能帮我吗?

我不知道你出了什么问题

下面是我如何让它工作的:

$ docker run -t -i --rm ubuntu:14.04 /bin/bash

And inside the container
# apt-get update && apt-get install -y software-properties-common
# add-apt-repository ppa:ubuntu-wine/ppa
# apt-get update

请尝试在之前定义此变量

LC_ALL=C.UTF-8 add-apt-repository ppa:ppaname/ppa

我解决了这个问题。容器的图像基于Debian wheezy,而不是ubuntu。我犯了一个愚蠢的错误。在我的例子中,
apt-get-y-software-properties-common
解决了这个问题。