docker: dpkg --add-architecture armhf not working in disco image

Bug #1810593 reported by slodki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-images
Won't Fix
Undecided
Unassigned

Bug Description

FROM ubuntu:disco
RUN dpkg --add-architecture armhf && apt-get update

generates the following error:

Get:1 http://archive.ubuntu.com/ubuntu disco InRelease [243 kB]
Get:2 http://security.ubuntu.com/ubuntu disco-security InRelease [65.4 kB]
Get:3 http://archive.ubuntu.com/ubuntu disco-updates InRelease [65.4 kB]
Get:4 http://archive.ubuntu.com/ubuntu disco-backports InRelease [65.5 kB]
Get:5 http://archive.ubuntu.com/ubuntu disco/multiverse amd64 Packages [197 kB]
Get:6 http://archive.ubuntu.com/ubuntu disco/restricted amd64 Packages [14.6 kB]
Ign:7 http://archive.ubuntu.com/ubuntu disco/main armhf Packages
Ign:8 http://archive.ubuntu.com/ubuntu disco/universe armhf Packages
Get:9 http://archive.ubuntu.com/ubuntu disco/universe amd64 Packages [11.9 MB]
Ign:10 http://archive.ubuntu.com/ubuntu disco/restricted armhf Packages
Ign:11 http://archive.ubuntu.com/ubuntu disco/multiverse armhf Packages
Get:12 http://archive.ubuntu.com/ubuntu disco/main amd64 Packages [1332 kB]
Ign:7 http://archive.ubuntu.com/ubuntu disco/main armhf Packages
Ign:8 http://archive.ubuntu.com/ubuntu disco/universe armhf Packages
Ign:10 http://archive.ubuntu.com/ubuntu disco/restricted armhf Packages
Ign:11 http://archive.ubuntu.com/ubuntu disco/multiverse armhf Packages
Ign:7 http://archive.ubuntu.com/ubuntu disco/main armhf Packages
Ign:8 http://archive.ubuntu.com/ubuntu disco/universe armhf Packages
Ign:10 http://archive.ubuntu.com/ubuntu disco/restricted armhf Packages
Ign:11 http://archive.ubuntu.com/ubuntu disco/multiverse armhf Packages
Ign:7 http://archive.ubuntu.com/ubuntu disco/main armhf Packages
Ign:8 http://archive.ubuntu.com/ubuntu disco/universe armhf Packages
Ign:10 http://archive.ubuntu.com/ubuntu disco/restricted armhf Packages
Ign:11 http://archive.ubuntu.com/ubuntu disco/multiverse armhf Packages
Ign:7 http://archive.ubuntu.com/ubuntu disco/main armhf Packages
Ign:8 http://archive.ubuntu.com/ubuntu disco/universe armhf Packages
Ign:10 http://archive.ubuntu.com/ubuntu disco/restricted armhf Packages
Ign:11 http://archive.ubuntu.com/ubuntu disco/multiverse armhf Packages
Err:7 http://archive.ubuntu.com/ubuntu disco/main armhf Packages
  404 Not Found [IP: 91.189.88.162 80]
Ign:8 http://archive.ubuntu.com/ubuntu disco/universe armhf Packages
Ign:10 http://archive.ubuntu.com/ubuntu disco/restricted armhf Packages
Ign:11 http://archive.ubuntu.com/ubuntu disco/multiverse armhf Packages
Fetched 13.9 MB in 3s (4794 kB/s)
Reading package lists...
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/disco/main/binary-armhf/Packages 404 Not Found [IP: 91.189.88.162 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

The working workaround is to add ports.ubuntu.com to apt sources:

FROM ubuntu:disco
RUN dpkg --add-architecture armhf && \
    sed -r 's#(deb(-src)?)( http://([a-z]{2}.)?archive.)#\1 [arch=i386,amd64]\3#' -i.bak /etc/apt/sources.list && \
    echo 'deb [arch=armhf] http://ports.ubuntu.com/ disco main restricted universe multiverse' >> /etc/apt/sources.list && \
    apt-get update

Get:1 http://archive.ubuntu.com/ubuntu disco InRelease [243 kB]
Get:2 http://security.ubuntu.com/ubuntu disco-security InRelease [65.4 kB]
Get:3 http://ports.ubuntu.com disco InRelease [243 kB]
Get:4 http://archive.ubuntu.com/ubuntu disco-updates InRelease [65.4 kB]
Get:5 http://ports.ubuntu.com disco/restricted armhf Packages [12.5 kB]
Get:6 http://archive.ubuntu.com/ubuntu disco-backports InRelease [65.5 kB]
Get:7 http://ports.ubuntu.com disco/main armhf Packages [1270 kB]
Get:8 http://archive.ubuntu.com/ubuntu disco/main i386 Packages [1316 kB]
Get:9 http://ports.ubuntu.com disco/universe armhf Packages [11.5 MB]
Get:10 http://archive.ubuntu.com/ubuntu disco/main amd64 Packages [1332 kB]
Get:11 http://archive.ubuntu.com/ubuntu disco/multiverse i386 Packages [181 kB]
Get:12 http://archive.ubuntu.com/ubuntu disco/universe i386 Packages [11.9 MB]
Get:13 http://ports.ubuntu.com disco/multiverse armhf Packages [155 kB]
Get:14 http://archive.ubuntu.com/ubuntu disco/universe amd64 Packages [11.9 MB]
Get:15 http://archive.ubuntu.com/ubuntu disco/restricted amd64 Packages [14.6 kB]
Get:16 http://archive.ubuntu.com/ubuntu disco/restricted i386 Packages [14.1 kB]
Get:17 http://archive.ubuntu.com/ubuntu disco/multiverse amd64 Packages [197 kB]
Fetched 40.5 MB in 5s (8474 kB/s)

Please fix /etc/apt/sources.list in docker ubuntu:disco image

slodki (slodki)
tags: added: partner-images
Revision history for this message
Cristovao Cordeiro (cjdc) wrote :

Please re-open if this is still happening in newer releases

Changed in cloud-images:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.