Ubuntu apt-get update 403 Proibido no docker na VM do Azure

2

Estou tentando criar um docker no azure. O Dockerfile começa assim

FROM ubuntu:16.04
RUN apt-get update && apt-get install -y libcurl4-openssl-dev libmysqlclient-dev libssl-dev

O comando de atualização falha com a seguinte saída

17:48:54 Step 3 : RUN apt-get update && apt-get install -y     libcurl4-openssl-dev     libmysqlclient-dev     libssl-dev
17:48:54  ---> Running in 5a07e406e05f
17:48:54 Ign:1 http://archive.ubuntu.com/ubuntu xenial InRelease
17:48:54 Ign:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
17:48:54 Ign:3 http://archive.ubuntu.com/ubuntu xenial-security InRelease
17:48:54 Ign:4 http://archive.ubuntu.com/ubuntu xenial Release
17:48:54 Ign:5 http://archive.ubuntu.com/ubuntu xenial-updates Release
17:48:54 Ign:6 http://archive.ubuntu.com/ubuntu xenial-security Release
17:48:54 Ign:7 http://archive.ubuntu.com/ubuntu xenial/main Sources
17:48:54 Ign:8 http://archive.ubuntu.com/ubuntu xenial/restricted Sources
17:48:54 Ign:9 http://archive.ubuntu.com/ubuntu xenial/universe Sources
17:48:54 Ign:10 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
17:48:54 Ign:11 http://archive.ubuntu.com/ubuntu xenial/main all Packages
17:48:54 Ign:12 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages
17:48:54 Ign:13 http://archive.ubuntu.com/ubuntu xenial/restricted all Packages
17:48:54 Ign:14 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
17:48:54 Ign:15 http://archive.ubuntu.com/ubuntu xenial/universe all Packages
17:48:54 Ign:16 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources
17:48:54 Ign:17 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Sources
17:48:54 Ign:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources
17:48:54 Ign:19 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
17:48:54 Ign:20 http://archive.ubuntu.com/ubuntu xenial-updates/main all Packages
17:48:54 Ign:21 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages
17:48:54 Ign:22 http://archive.ubuntu.com/ubuntu xenial-updates/restricted all Packages
17:48:55 Ign:23 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
17:48:55 Ign:24 http://archive.ubuntu.com/ubuntu xenial-updates/universe all Packages
17:48:55 Ign:25 http://archive.ubuntu.com/ubuntu xenial-security/main Sources
17:48:55 Ign:26 http://archive.ubuntu.com/ubuntu xenial-security/restricted Sources
17:48:55 Ign:27 http://archive.ubuntu.com/ubuntu xenial-security/universe Sources
17:48:55 Ign:28 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
17:48:55 Ign:29 http://archive.ubuntu.com/ubuntu xenial-security/main all Packages
17:48:55 Ign:30 http://archive.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
17:48:55 Ign:31 http://archive.ubuntu.com/ubuntu xenial-security/restricted all Packages
17:48:55 Ign:32 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
17:48:55 Ign:33 http://archive.ubuntu.com/ubuntu xenial-security/universe all Packages
17:48:55 Ign:7 http://archive.ubuntu.com/ubuntu xenial/main Sources
17:48:55 Ign:8 http://archive.ubuntu.com/ubuntu xenial/restricted Sources
17:48:55 Ign:9 http://archive.ubuntu.com/ubuntu xenial/universe Sources
17:48:55 Ign:10 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
17:48:55 Ign:11 http://archive.ubuntu.com/ubuntu xenial/main all Packages
17:48:55 Ign:12 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages
17:48:55 Ign:13 http://archive.ubuntu.com/ubuntu xenial/restricted all Packages
17:48:55 Ign:14 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
17:48:55 Ign:15 http://archive.ubuntu.com/ubuntu xenial/universe all Packages
17:48:55 Ign:16 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources
17:48:55 Ign:17 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Sources
17:48:55 Ign:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources
17:48:55 Ign:19 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
17:48:55 Ign:20 http://archive.ubuntu.com/ubuntu xenial-updates/main all Packages
17:48:55 Ign:21 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages
17:48:55 Ign:22 http://archive.ubuntu.com/ubuntu xenial-updates/restricted all Packages
17:48:55 Ign:23 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
17:48:55 Ign:24 http://archive.ubuntu.com/ubuntu xenial-updates/universe all Packages
17:48:55 Ign:25 http://archive.ubuntu.com/ubuntu xenial-security/main Sources
17:48:55 Ign:26 http://archive.ubuntu.com/ubuntu xenial-security/restricted Sources
17:48:55 Ign:27 http://archive.ubuntu.com/ubuntu xenial-security/universe Sources
17:48:55 Ign:28 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
17:48:55 Ign:29 http://archive.ubuntu.com/ubuntu xenial-security/main all Packages
17:48:55 Ign:30 http://archive.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
17:48:55 Ign:31 http://archive.ubuntu.com/ubuntu xenial-security/restricted all Packages
17:48:55 Ign:32 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
17:48:55 Ign:33 http://archive.ubuntu.com/ubuntu xenial-security/universe all Packages
17:48:55 Ign:7 http://archive.ubuntu.com/ubuntu xenial/main Sources
17:48:55 Ign:8 http://archive.ubuntu.com/ubuntu xenial/restricted Sources
17:48:55 Ign:9 http://archive.ubuntu.com/ubuntu xenial/universe Sources
17:48:55 Ign:10 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
17:48:55 Ign:11 http://archive.ubuntu.com/ubuntu xenial/main all Packages
17:48:55 Ign:12 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages
17:48:55 Ign:13 http://archive.ubuntu.com/ubuntu xenial/restricted all Packages
17:48:55 Ign:14 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
17:48:55 Ign:15 http://archive.ubuntu.com/ubuntu xenial/universe all Packages
17:48:55 Ign:16 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources
17:48:55 Ign:17 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Sources
17:48:55 Ign:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources
17:48:55 Ign:19 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
17:48:55 Ign:20 http://archive.ubuntu.com/ubuntu xenial-updates/main all Packages
17:48:55 Ign:21 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages
17:48:55 Ign:22 http://archive.ubuntu.com/ubuntu xenial-updates/restricted all Packages
17:48:55 Ign:23 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
17:48:55 Ign:24 http://archive.ubuntu.com/ubuntu xenial-updates/universe all Packages
17:48:55 Ign:25 http://archive.ubuntu.com/ubuntu xenial-security/main Sources
17:48:55 Ign:26 http://archive.ubuntu.com/ubuntu xenial-security/restricted Sources
17:48:55 Ign:27 http://archive.ubuntu.com/ubuntu xenial-security/universe Sources
17:48:55 Ign:28 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
17:48:55 Ign:29 http://archive.ubuntu.com/ubuntu xenial-security/main all Packages
17:48:55 Ign:30 http://archive.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
17:48:55 Ign:31 http://archive.ubuntu.com/ubuntu xenial-security/restricted all Packages
17:48:55 Ign:32 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
17:48:55 Ign:33 http://archive.ubuntu.com/ubuntu xenial-security/universe all Packages
17:48:55 Ign:7 http://archive.ubuntu.com/ubuntu xenial/main Sources
17:48:55 Ign:8 http://archive.ubuntu.com/ubuntu xenial/restricted Sources
17:48:55 Ign:9 http://archive.ubuntu.com/ubuntu xenial/universe Sources
17:48:55 Ign:10 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
17:48:55 Ign:11 http://archive.ubuntu.com/ubuntu xenial/main all Packages
17:48:55 Ign:12 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages
17:48:55 Ign:13 http://archive.ubuntu.com/ubuntu xenial/restricted all Packages
17:48:55 Ign:14 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
17:48:55 Ign:15 http://archive.ubuntu.com/ubuntu xenial/universe all Packages
17:48:55 Ign:16 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources
17:48:55 Ign:17 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Sources
17:48:55 Ign:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources
17:48:55 Ign:19 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
17:48:55 Ign:20 http://archive.ubuntu.com/ubuntu xenial-updates/main all Packages
17:48:55 Ign:21 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages
17:48:55 Ign:22 http://archive.ubuntu.com/ubuntu xenial-updates/restricted all Packages
17:48:55 Ign:23 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
17:48:55 Ign:24 http://archive.ubuntu.com/ubuntu xenial-updates/universe all Packages
17:48:55 Ign:25 http://archive.ubuntu.com/ubuntu xenial-security/main Sources
17:48:55 Ign:26 http://archive.ubuntu.com/ubuntu xenial-security/restricted Sources
17:48:55 Ign:27 http://archive.ubuntu.com/ubuntu xenial-security/universe Sources
17:48:55 Ign:28 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
17:48:55 Ign:29 http://archive.ubuntu.com/ubuntu xenial-security/main all Packages
17:48:55 Ign:30 http://archive.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
17:48:55 Ign:31 http://archive.ubuntu.com/ubuntu xenial-security/restricted all Packages
17:48:55 Ign:32 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
17:48:55 Ign:33 http://archive.ubuntu.com/ubuntu xenial-security/universe all Packages
17:48:55 Ign:7 http://archive.ubuntu.com/ubuntu xenial/main Sources
17:48:55 Ign:8 http://archive.ubuntu.com/ubuntu xenial/restricted Sources
17:48:55 Ign:9 http://archive.ubuntu.com/ubuntu xenial/universe Sources
17:48:55 Ign:10 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
17:48:55 Ign:11 http://archive.ubuntu.com/ubuntu xenial/main all Packages
17:48:55 Ign:12 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages
17:48:55 Ign:13 http://archive.ubuntu.com/ubuntu xenial/restricted all Packages
17:48:55 Ign:14 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
17:48:55 Ign:15 http://archive.ubuntu.com/ubuntu xenial/universe all Packages
17:48:55 Ign:16 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources
17:48:55 Ign:17 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Sources
17:48:55 Ign:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources
17:48:55 Ign:19 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
17:48:55 Ign:20 http://archive.ubuntu.com/ubuntu xenial-updates/main all Packages
17:48:55 Ign:21 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages
17:48:55 Ign:22 http://archive.ubuntu.com/ubuntu xenial-updates/restricted all Packages
17:48:55 Ign:23 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
17:48:55 Ign:24 http://archive.ubuntu.com/ubuntu xenial-updates/universe all Packages
17:48:55 Ign:25 http://archive.ubuntu.com/ubuntu xenial-security/main Sources
17:48:55 Ign:26 http://archive.ubuntu.com/ubuntu xenial-security/restricted Sources
17:48:55 Ign:27 http://archive.ubuntu.com/ubuntu xenial-security/universe Sources
17:48:55 Ign:28 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
17:48:55 Ign:29 http://archive.ubuntu.com/ubuntu xenial-security/main all Packages
17:48:55 Ign:30 http://archive.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
17:48:55 Ign:31 http://archive.ubuntu.com/ubuntu xenial-security/restricted all Packages
17:48:55 Ign:32 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
17:48:55 Ign:33 http://archive.ubuntu.com/ubuntu xenial-security/universe all Packages
17:48:55 Err:7 http://archive.ubuntu.com/ubuntu xenial/main Sources
17:48:55   403  Forbidden [IP: 91.189.88.162 80]
17:48:55 Ign:8 http://archive.ubuntu.com/ubuntu xenial/restricted Sources
17:48:55 Ign:9 http://archive.ubuntu.com/ubuntu xenial/universe Sources
17:48:55 Ign:10 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
17:48:55 Ign:11 http://archive.ubuntu.com/ubuntu xenial/main all Packages
17:48:55 Ign:12 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages
17:48:55 Ign:13 http://archive.ubuntu.com/ubuntu xenial/restricted all Packages
17:48:55 Ign:14 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
17:48:55 Ign:15 http://archive.ubuntu.com/ubuntu xenial/universe all Packages
17:48:55 Err:16 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources
17:48:55   403  Forbidden [IP: 91.189.88.162 80]
17:48:55 Ign:17 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Sources
17:48:55 Ign:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources
17:48:55 Ign:19 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
17:48:55 Ign:20 http://archive.ubuntu.com/ubuntu xenial-updates/main all Packages
17:48:55 Ign:21 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages
17:48:55 Ign:22 http://archive.ubuntu.com/ubuntu xenial-updates/restricted all Packages
17:48:55 Ign:23 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
17:48:55 Ign:24 http://archive.ubuntu.com/ubuntu xenial-updates/universe all Packages
17:48:55 Err:25 http://archive.ubuntu.com/ubuntu xenial-security/main Sources
17:48:55   403  Forbidden [IP: 91.189.88.162 80]
17:48:55 Ign:26 http://archive.ubuntu.com/ubuntu xenial-security/restricted Sources
17:48:55 Ign:27 http://archive.ubuntu.com/ubuntu xenial-security/universe Sources
17:48:55 Ign:28 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
17:48:55 Ign:29 http://archive.ubuntu.com/ubuntu xenial-security/main all Packages
17:48:55 Ign:30 http://archive.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
17:48:55 Ign:31 http://archive.ubuntu.com/ubuntu xenial-security/restricted all Packages
17:48:55 Ign:32 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
17:48:55 Ign:33 http://archive.ubuntu.com/ubuntu xenial-security/universe all Packages
17:48:55 Reading package lists...
17:48:55 [91mW[0m[91m: The repository 'http://archive.ubuntu.com/ubuntu xenial Release' does not have a Release file.
17:48:55 [0m[91mW: The repository 'http://archive.ubuntu.com/ubuntu xenial-updates Release' does not have a Release file.[0m[91m
17:48:55 W: [0m[91mThe repository 'http://archive.ubuntu.com/ubuntu xenial-security Release' does not have a Release file.[0m[91m
17:48:55 [0m[91mE: [0m[91mFailed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/main/source/Sources  403  Forbidden [IP: 91.189.88.162 80]
17:48:55 [0m[91mE: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/source/Sources  403  Forbidden [IP: 91.189.88.162 80]
17:48:55 [0m[91mE[0m[91m: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/main/source/Sources  403  Forbidden [IP: 91.189.88.162 80][0m[91m
17:48:55 E: Some index files failed to download. They have been ignored, or old ones used instead.
17:48:55 [0mThe command '/bin/sh -c apt-get update && apt-get install -y     libcurl4-openssl-dev     libmysqlclient-dev     libssl-dev' returned a non-zero code: 100

O mesmo Dockerfile foi criado no meu laptop e em outras VMs do Azure. Eu tentei reimplantar a VM, sem sucesso. O que faz com que esse comando específico falhe nesta VM e não em outras? A VM azul está executando o Ubuntu 16.04 (imagem padrão da Microsoft), assim como a VM em que está trabalhando.

EDIT: criou uma nova VM, dessa vez com a imagem do Docker do Azure, e eu tive o mesmo problema. Ainda trabalhando em outra VM que foi criada há alguns meses.

    
por user3711864 24.11.2016 / 17:58

1 resposta

1

Eu tenho exatamente o mesmo problema ao tentar executar um contêiner docker com o ubuntu 16.04 no Google Compute Engine.

Correção rápida (para mim no GCE):

Use ftp em vez de httpeg sed -i s/http/ftp/ /etc/apt/sources.list && apt-get update

Meu palpite é que os provedores de nuvem têm seus próprios espelhos (faça sentido, pense quantas vezes apt-get update é executado em seu dc ... ter espelhos locais economizaria muita largura de banda)

Talvez algum proxy http não esteja redirecionando as solicitações vindas das imagens do docker para o espelho ...

    
por 01.12.2016 / 02:00