Hash sum mismatch / Writing more data as expected

@robinsarfati / @mnabialek

I tried many suggestions from Google including setting various headers, removing partials, cleaning apt, and deleting the sources files, however none worked.

I found this article that suggested it might be that you are going through a bad proxy: https://github.com/jenkinsci/docker/issues/543

The solution is to create a file called badproxy with these lines:

Acquire::http::Pipeline-Depth 0;
Acquire::http::No-Cache true;
Acquire::BrokenProxy    true;

then add a line to your Dockerfile to copy it into the apt config folder:

COPY ./badproxy /etc/apt/apt.conf.d/99fixbadproxy

This resolved my issue and the image builds correctly now.

Hope this helps.

2 Likes