RUN apt-get update is failing on the Circle CI docker image

Running apt-get update is failing and is preventing our builds from succeeding

Blockquote
W: Size of file /var/lib/apt/lists/deb.nodesource.com_node%5f4.x_dists_jessie_main_binary-amd64_Packages.gz is not what the server reported 1004 1005
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found

Blockquote

Hello,

We are discussing what happened over here: Apt-get update return 404

An upstream change has temporarily broken some things. We have a PR to fix it ASAP. In the meantime you may run:

 - run: |
        sudo rm /etc/apt/sources.list
        echo "deb http://archive.debian.org/debian/ jessie-backports main" | sudo tee -a /etc/apt/sources.list
        echo "deb-src http://archive.debian.org/debian/ jessie-backports main" | sudo tee -a /etc/apt/sources.list
        echo "Acquire::Check-Valid-Until false;" | sudo tee -a /etc/apt/apt.conf.d/10-nocheckvalid
        echo 'Package: *\nPin: origin "archive.debian.org"\nPin-Priority: 500' | sudo tee -a /etc/apt/preferences.d/10-archive-pin
        sudo apt-get update
1 Like