基本的に私は:
FROM ubuntu:18.04
RUN apt update
RUN apt install -y software-properties-common ca-certificates wget curl ssh
RUN apt install -y build-essential
最終的には:
...
Get:48 http://archive.ubuntu.com/ubuntu bionic/main AMD64 libalgorithm-merge-Perl all 0.08-3 [12.0 kB]
Get:49 http://archive.ubuntu.com/ubuntu bionic/main AMD64 libfile-fcntllock-Perl AMD64 0.22-3build2 [33.2 kB]
Get:50 http://archive.ubuntu.com/ubuntu bionic/main AMD64 manpages-dev all 4.15-1 [2217 kB]
Fetched 44.2 MB in 3s (15.0 MB/s)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_4.15.0-19.20_AMD64.deb 404 Not Found [IP: 91.189.88.149 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c apt install -y build-essential' returned a non-zero code: 100
壊れたパッケージはありますか?
--no-cache
をDockerに渡すことでこれを解決しました。