Development Tip

Docker 저장소에 Ubuntu에서 apt-get 업데이트 실행시 릴리스 파일이 없음

yourdevel 2020. 11. 16. 22:18
반응형

Docker 저장소에 Ubuntu에서 apt-get 업데이트 실행시 릴리스 파일이 없음


Ubuntu 16.10을 사용하고 있으며 여기에 있는 지침에 따라 Xenial 빌드를 사용하여 최근에 Docker (v1.12.4)를 설치 했습니다 . 컨테이너를 만드는 데 문제가 발생하지 않았으며 자동으로 다시 시작되는지 확인하는 등의 문제가 발생하지 않았습니다.

그러나 이제 apt-get update를 실행할 때마다 다음 오류 메시지가 나타납니다.

W: The repository 'https://apt.dockerproject.org/repo ubuntu-xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://apt.dockerproject.org/repo/dists/ubuntu-xenial/main/binary-amd64/Packages
E: Some index files failed to download. They have been ignored, or old ones used instead.

여기 에서 찾은 조언에 따라 문제를 해결하려고했지만 이 문제를 해결할 수없는 것 같습니다.

누구든지 이것을 전에 만났고 고쳤습니까? 그렇다면이를 해결하려면 무엇이 필요합니까?


Linux mint에서는 공식 지침이 작동하지 않았습니다. 로 가서로 /etc/apt/sources.list.d/additional-repositories.list변경 serena해야했습니다 xenial.


Linux Mint의 경우이 문제는 실제로 Docker 웹 사이트 에서 참조됩니다 .

참고 : 아래의 lsb_release -cs 하위 명령은 xenial과 같은 Ubuntu 배포의 이름을 반환합니다. 때로는 Linux Mint와 같은 배포에서 $ (lsb_release -cs)를 상위 Ubuntu 배포로 변경해야 할 수 있습니다. 예를 들어 Linux Mint Rafaela를 사용하는 경우 trusty를 사용할 수 있습니다. amd64 :

$ sudo add-apt-repository \ "deb [arch = amd64] https://download.docker.com/linux/ubuntu \ $ (lsb_release -cs) \
stable"

lsb_release -cs명령은 Docker에 준비된 패키지가없는 저장소를 제공하므로 xenial로 변경해야합니다.

Ubuntu 16.04 Xenial을 기반으로하는 Linux Mint 18 의 올바른 명령 은 다음과 같습니다.

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   xenial \
   stable"

엘리엇 비치가 맞습니다. 고마워요 엘리엇.

다음은 내 요점 의 코드입니다 .

sudo apt-get remove docker docker-engine docker.io

sudo apt-get update

sudo apt-get install apt-transport-https ca-certificates curl software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo apt-key fingerprint 0EBFCD88

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
xenial \
stable"

sudo apt-get update

sudo apt-get install docker-ce

sudo docker run hello-world

내 문제를 해결 한 Ikraider의 흥미로운 게시물을 보았습니다 : https://github.com/docker/docker/issues/22599

웹 사이트 지침이 잘못되었습니다. 다음은 16.04에서 작동하는 것입니다.

curl -s https://yum.dockerproject.org/gpg | sudo apt-key add
apt-key fingerprint 58118E89F3A912897C070ADBF76221572C52609D
sudo add-apt-repository "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main"
sudo apt-get update
sudo apt-get install docker-engine=1.13.0-0~ubuntu-xenial

공식 도커 문서에서도 제안한 바와 같습니다. 이것을 실행하십시오 :

  • sudo vi /etc/apt/sources.list

그런 다음 deb [arch=amd64] https://download.docker.com/linux/ubuntu/ xenial stable파일의 마지막 줄에서 해당 항목 ( )을 제거 / 주석 처리 합니다.

그런 다음 터미널에서 다음 명령을 실행하십시오.

  • sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu/ bionic stable"

  • sudo apt-get update

제 경우에는 효과가있었습니다.


다음은 문제를 해결하는 데 사용되는 단계 목록입니다.

  1. Docker를 제거합니다 (이미지, 컨테이너, 볼륨 또는 사용자 지정 구성 파일은 삭제되지 않음).

    sudo apt-get purge docker-engine

  2. Docker apt 키를 제거하십시오.

    sudo apt-key del 58118E89F3A912897C070ADBF76221572C52609D

  3. docker.list 파일을 삭제합니다.

    sudo rm /etc/apt/sources.list.d/docker.list

  4. apt 캐시 파일을 수동으로 삭제합니다.

    sudo rm /var/lib/apt/lists/apt.dockerproject.org_repo_dists_ubuntu-xenial_*

  5. apt-transport-httpsca-certificates 삭제 :

    sudo apt-get purge apt-transport-https ca-certificates

  6. apt를 청소하고 자동 제거를 수행하십시오.

    sudo apt-get clean && sudo apt-get autoremove

  7. Ubuntu를 재부팅합니다.

    sudo 재부팅

  8. apt-get update를 실행합니다.

    sudo apt-get 업데이트

  9. apt-transport-https 및 ca-certificates를 다시 설치합니다.

    sudo apt-get install apt-transport-https ca-certificates

  10. 적절한 키를 추가합니다.

    sudo apt-key adv \ --keyserver hkp : //ha.pool.sks-keyservers.net : 80 \ --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

  11. docker.list 파일을 다시 추가하십시오.

    echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main"| sudo tee /etc/apt/sources.list.d/docker.list

  12. apt-get update를 실행합니다.

    sudo apt-get 업데이트

  13. Docker 설치 :

    sudo apt-get install docker-engine

물론 변수가 많고 결과가 다를 수 있습니다. 그러나 이러한 단계는 가능한 한 많은 영역을 포함하여 잠재적 인 문제 지점을 제거하여 성공 가능성을 높입니다.

2017 년 7 월 6 일 업데이트

최신 버전의 Docker는 이러한 많은 문제를 제거해야하는 다른 설치 프로세스를 사용하고있는 것으로 보입니다. https://docs.docker.com/engine/installation/linux/ubuntu/ 를 확인 하십시오 .


나도 비슷한 문제가있었습니다. 누군가 나를 위해 일한 것이 도움이 될 수 있습니다.

머신이 Ubuntu 16.04를 실행하고 있으며 Docker CE가 있습니다. 여기에 제공된 답변과 링크, 특히 Elliot Beach에서 제공하는 Docker 웹 사이트의 링크를 살펴본 후 /etc/apt/sources.list를 열고 조사했습니다.

파일에는 deb [arch=amd64] https://download.docker.com/linux/ubuntu (lsb_release -cs) stabledeb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable.

두 번째가 필요한 것이기 때문에 첫 번째는 간단히 주석 처리하고 문서를 저장하고 이제 문제가 해결되었습니다. 테스트로 동일한 문서로 돌아가서 주석 기호를 제거하고 sudo apt-get update다시 실행 했습니다. 내가 그렇게했을 때 문제가 돌아 왔습니다.

요약하자면, Docker 웹 사이트에 명시된대로 부모 Ubuntu 배포 이름이 있었을뿐만 아니라 (lsb_release -cs)가 포함 된 줄도 주석 처리했습니다.


파일을 편집 /etc/apt/sources.list.d/additional-repositories.list하고 deb를 추가 [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable하는 것이 저에게 효과적 이었습니다.이 게시물은 https://github.com/typora/typora-issues/issues/2065 매우 유용했습니다.


I still have the same issue. None of the answers above seem to solve it. I have ubuntu 16.04, and I follow the steps described in https://docs.docker.com/install/linux/docker-ce/ubuntu/

I suspect it is related to an apt-get bug regarding https. The information being printed by apt-get is kind of misleading.

I think that Failed to fetch.. can also be translated as: problem accessing resource from within an https connection

How did I come to this conclusion:

First of all I am behind a corporate proxy so I have set the following configuration:

/etc/apt/apt.conf

Acquire::http::proxy "http://squidproxy:8080/";
Acquire::https::proxy "http://squidproxy:8080/";
Acquire::ftp::proxy "ftp://squidproxy:8080/";

Acquire::https::CaInfo     "/etc/ssl/certs/ca-certificates.pem";

/etc/apt/apt.conf.d/99proxy

Acquire::http::Proxy {
    localhost DIRECT;
    localhost:9020 DIRECT;
    localhost:9021 DIRECT;
};

I performed the following tests with differrent entries in sources.list

test entry 1:

deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable

sudo apt-get update

W: The repository 'https://download.docker.com/linux/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration     details.
E: Failed to fetch     https://download.docker.com/linux/ubuntu/dists/xenial/stable/binary-amd64/Packages  
E: Some index files failed to download. They have been ignored, or old ones used instead.

Failure

test entry 2:

deb [arch=amd64] http://localhost:9020/linux/ubuntu xenial stable

/etc/apache2/sites-enabled/apt-proxy.conf

# http to https reverse proxy configuration.
Listen 9020
<VirtualHost *:9020>
SSLProxyEngine On
# pass from squid proxy
ProxyRemote https://download.docker.com/ http://squidproxy:8080
ProxyPass / https://download.docker.com/
ProxyPassReverse / https://download.docker.com/
ErrorLog ${APACHE_LOG_DIR}/apt-proxy-error.log
CustomLog ${APACHE_LOG_DIR}/apt-proxy-access.log combined
</VirtualHost>

sudo apt-get update

Hit:1 ..
Hit:2 ..
  ...                                                              
Hit:7 http://localhost:9020/linux/ubuntu xenial InRelease                
Get:8 ...
Fetched 323 kB in 0s (419 kB/s)
Reading package lists... Done

Success

test entry 3:

deb [arch=amd64] https://localhost:9021/linux/ubuntu xenial stable

/etc/apache2/sites-enabled/apt-proxy.conf

# https to https revere proxy
Listen 9021
<VirtualHost *:9021>
# serve on https
SSLEngine on
SSLCertificateFile      /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
SSLProxyEngine On
# pass from squid proxy
ProxyRemote https://download.docker.com/ http://squidproxy:8080
ProxyPass / https://download.docker.com/
ProxyPassReverse / https://download.docker.com/
ErrorLog ${APACHE_LOG_DIR}/apt-proxy-error.log
CustomLog ${APACHE_LOG_DIR}/apt-proxy-access.log combined
</VirtualHost>

sudo apt-get update

W: The repository 'https://localhost:9021/linux/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://localhost:9021/linux/ubuntu/dists/xenial/stable/binary-amd64/Packages  
E: Some index files failed to download. They have been ignored, or old ones used instead.

Failure


In the above cases the url which apt-get Failed to fetch and also the Release file, were actually accessible from browser / wget / curl using the same proxy configuration.
The fact that apt-get worked only with http reverse proxy url, implies that there is some issue accessing resources from within an https connection.
I do not know what this issue is but apt-get should show a more informative message ( apt is even less verbose ).

Note: wiresharking case 1 showed that proxy CONNECT was successful, and no RST was sent, but of course the files could not be read.


Best check for this problem : (If you are behind proxy),(tested on ubuntu 18.04), (will work on other ubuntu also),(mostly error in : https_proxy="http://192.168.0.251:808/)

  1. Check these files:

    #sudo cat /etc/environment :
    http_proxy="http://192.168.0.251:808/"
    https_proxy="http://192.168.0.251:808/"
    ftp_proxy="ftp://192.168.0.251:808/"
    socks_proxy="socks://192.168.0.251:808/"
    #sudo cat /etc/apt/apt.conf :
    Acquire::http::proxy "http://192.168.0.251:808/";
    Acquire::https::proxy "http://192.168.0.251:808/";
    Acquire::ftp::proxy "ftp://192.168.0.251:808/";
    Acquire::socks::proxy "socks://192.168.0.251:808/";
    
  2. Add docker stable repo

    #sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" 
    
  3. Run apt-get update:

    #sudo apt-get update
    
  4. Check Docker CE

    #apt-cache policy docker-ce
    
  5. install Docker

    #sudo apt-get install docker-ce
    

참고URL : https://stackoverflow.com/questions/41133455/docker-repository-does-not-have-a-release-file-on-running-apt-get-update-on-ubun

반응형