Running docker build .
against the following dockerfile
FROM ubuntu:16.04
MAINTAINER b@example.com
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get update -y
I get the error
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/source/by-hash/SHA256/50ccff6c903e98e2e52c1ab6dae4a85d23a84369325fd971c4bfc3752e6a7ede Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
I then tried adding every solution in this question to my dockerfile: Trouble downloading packages list due to a "Hash sum mismatch" error
FROM ubuntu:16.04
MAINTAINER b@example.com
RUN touch /etc/apt/apt.conf.d/99fixbadproxy \
&& echo "Acquire::http::Pipeline-Depth 0;" >> /etc/apt/apt.conf.d/99fixbadproxy \
&& echo "Acquire::http::No-Cache true;" >> /etc/apt/apt.conf.d/99fixbadproxy \
&& echo "Acquire::BrokenProxy true;" >> /etc/apt/apt.conf.d/99fixbadproxy \
&& apt-get update -o Acquire::CompressionTypes::Order::=gz \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get update -y
but I get the same error.
What else can I do?
docker build -no-cache
because such a long RUN command as one layer might not have been invalidated in the cache after your changes. – FatalMerlin Jan 17 '17 at 13:22