Docker won't build a container on Ubuntu 14.04 via AWS

I’m using Ubuntu 14.04 via AWS.

My Docker build is failing:

sudo docker build -t nginx_img_1 .

I see these errors (among others):

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/main/binary-amd64/Packages 404 Not Found [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/universe/binary-amd64/Packages 404 Not Found [IP: 91.189.91.15 80]

I cannot download the packages themselves to try to get Docker to work. Those URLs are indeed broken: just try to go them manually in a web browser. Someone else out there is using Docker on Ubuntu with AWS. What are those people doing? Is there a configuration file that I can use to circumvent this error?

This forum thread might help you out: http://ubuntuforums.org/showthread.php?t=2277592

I tested commenting out RUN echo "deb http://archive.ubuntu.com/ubuntu/ raring main universe" >> /etc/apt/sources.list and it resulted in a successful build.