Score:0

Docker failing to resolve archive.ubuntu.com

ar flag

All of a sudden I cannot build a container requires access to archive.ubuntu.com. Here is my dockerfile:

FROM ubuntu:20.04

RUN apt update && apt install -y wget && \
    wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
    dpkg -i packages-microsoft-prod.deb && \
    rm packages-microsoft-prod.deb && \
    apt update && \
    apt install -y dotnet-sdk-6.0 && \
    apt install -y build-essential && \
    apt install -y cmake && \
    apt install -y libssl-dev && \
    apt install -y libgpiod-dev  && \
    apt install -y libi2c-dev && \
    apt install -y tmux && \
    apt install -y systemctl && \
    apt install -y git build-essential libjansson-dev libi2c-dev libgpiod-dev libsensors4-dev libz-dev libsystemd-dev

Going to archive.ubuntu.com in my browser does not seem quite right either. I can click on the ubuntu folder and it seems as if something may be broken. screenshot

I can keep clicking on Ubuntu and it just keeps going deeper.

Error that I get:

[+] Building 168.9s (6/11)                                                                                                                                
 => [internal] load .dockerignore                                                                                                                    0.0s
 => => transferring context: 2B                                                                                                                      0.0s
 => [internal] load build definition from Dockerfile                                                                                                 0.0s
 => => transferring dockerfile: 1.28kB                                                                                                               0.0s
 => [internal] load metadata for docker.io/library/ubuntu:20.04                                                                                      0.3s
 => CACHED [1/8] FROM docker.io/library/ubuntu:20.04@sha256:c9820a44b950956a790c354700c1166a7ec648bc0d215fa438d3a339812f1d01                         0.0s
 => [internal] load build context                                                                                                                    0.4s
 => => transferring context: 1.55MB                                                                                                                  0.4s
 => ERROR [2/8] RUN apt update && apt install -y wget &&     wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.d  168.6s
------                                                                                                                                                    
 > [2/8] RUN apt update && apt install -y wget &&     wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb &&     dpkg -i packages-microsoft-prod.deb &&     rm packages-microsoft-prod.deb &&     apt update &&     apt install -y dotnet-sdk-6.0 &&     apt install -y build-essential &&     apt install -y cmake &&     apt install -y libssl-dev &&     apt install -y libgpiod-dev  &&     apt install -y libi2c-dev &&     apt install -y tmux &&     apt install -y systemctl &&     apt install -y git build-essential libjansson-dev libi2c-dev libgpiod-dev libsensors4-dev libz-dev libsystemd-dev:                                                                                                                  
#0 0.374 
#0 0.374 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#0 0.374 
#0 56.42 Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
#0 56.42   Temporary failure resolving 'archive.ubuntu.com'
#0 56.44 Err:2 http://security.ubuntu.com/ubuntu focal-security InRelease
#0 56.44   Temporary failure resolving 'security.ubuntu.com'
#0 112.5 Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
#0 112.5   Temporary failure resolving 'archive.ubuntu.com'
#0 168.5 Err:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
#0 168.5   Temporary failure resolving 'archive.ubuntu.com'
#0 168.5 Reading package lists...
#0 168.5 Building dependency tree...
#0 168.5 Reading state information...
#0 168.5 All packages are up to date.
#0 168.5 W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease  Temporary failure resolving 'archive.ubuntu.com'
#0 168.5 W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Temporary failure resolving 'archive.ubuntu.com'
#0 168.5 W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Temporary failure resolving 'archive.ubuntu.com'
#0 168.5 W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
#0 168.5 W: Some index files failed to download. They have been ignored, or old ones used instead.
#0 168.5 
#0 168.5 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#0 168.5 
#0 168.5 Reading package lists...
#0 168.5 Building dependency tree...
#0 168.5 Reading state information...
#0 168.5 E: Unable to locate package wget
------
Dockerfile:3
--------------------
   2 |     
   3 | >>> RUN apt update && apt install -y wget && \
   4 | >>>     wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
   5 | >>>     dpkg -i packages-microsoft-prod.deb && \
   6 | >>>     rm packages-microsoft-prod.deb && \
   7 | >>>     apt update && \
   8 | >>>     apt install -y dotnet-sdk-6.0 && \
   9 | >>>     apt install -y build-essential && \
  10 | >>>     apt install -y cmake && \
  11 | >>>     apt install -y libssl-dev && \
  12 | >>>     apt install -y libgpiod-dev  && \
  13 | >>>     apt install -y libi2c-dev && \
  14 | >>>     apt install -y tmux && \
  15 | >>>     apt install -y systemctl && \
  16 | >>>     apt install -y git build-essential libjansson-dev libi2c-dev libgpiod-dev libsensors4-dev libz-dev libsystemd-dev
  17 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c apt update && apt install -y wget &&     wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb &&     dpkg -i packages-microsoft-prod.deb &&     rm packages-microsoft-prod.deb &&     apt update &&     apt install -y dotnet-sdk-6.0 &&     apt install -y build-essential &&     apt install -y cmake &&     apt install -y libssl-dev &&     apt install -y libgpiod-dev  &&     apt install -y libi2c-dev &&     apt install -y tmux &&     apt install -y systemctl &&     apt install -y git build-essential libjansson-dev libi2c-dev libgpiod-dev libsensors4-dev libz-dev libsystemd-dev" did not complete successfully: exit code: 100

What I have tried:

I verified that the docker daemon.json has the correct DNS IPs.

EDIT: Output of getfacl

user::rwx
group::r-x
other::r-x
Marco avatar
br flag
I had this problem, because of extended file attributes (fsetacl) in the docker root folder. Could you add the output of `getfacl yourdockerroot` to the question.
adastra avatar
ar flag
@Marco user::rwx group::r-x other::r-x
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.