W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found [IP: 151.101.140.204 80]

Thanks to @Awesome123 for the useful answer and other people who commented. Their suggestions were useful but didn't give an exact steps to get rid of problem because the trouble that I was having was due to an image of Node 6.10, which comes with Debian Jessie. To resolve the issue I updated my Dockerfile with following:

RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list

# As suggested by a user, for some people this line works instead of the first one. Use whichever works for your case
# RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie main" > /etc/apt/sources.list.d/jessie.list


RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list

RUN apt-get -o Acquire::Check-Valid-Until=false update

Here is a reference to the existing answer on StackExchange where I discovered the snippet: https://unix.stackexchange.com/a/508948/200484


UPDATE 1

As suggested by @douglas-resende, I've updated the snippet to include a replacement of line 1 (commented), it works for some people