Docker RUN apt-get -y update && apt-get install -y fortunes

Tried to build my own docker, got a little problem, here’s the log
i was following the tutorial on Docker.

FROM docker/whalesay:lateset
RUN apt-get -y update && apt-get install -y fortunes
CMD /usr/games/fortune -a | cowsay

This happened after RUN apt-get…

  • Connecting to Docker-Machine via docker-py on OSX
  • Logs not being flushed to Elasticsearch container through Fluentd
  • EC2 User Data runs script but does not boot up application
  • Deploying Mysql on Mesos using Marathon
  • Proper way of reporting performance data for C# application in a Container (Docker)
  • Installing Docker with script on Windows
  • W: Size of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_source_Sources.gz is not what the server reported 213537 7925687
    W: Size of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-amd64_Packages.gz is not what the server reported 11688 7588885
    W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/source/Sources  Hash Sum mismatch
    
    W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/restricted/source/Sources  Hash Sum mismatch
    
    W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-amd64/Packages  Hash Sum mismatch
    
    W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/restricted/binary-amd64/Packages  Hash Sum mismatch
    
    W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-amd64/Packages  Hash Sum mismatch
    
    W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/main/source/Sources  Hash Sum mismatch
    
    W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/restricted/source/Sources  Hash Sum mismatch
    
    W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/universe/source/Sources  Hash Sum mismatch
    
    W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/main/binary-amd64/Packages  Hash Sum mismatch
    
    W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/restricted/binary-amd64/Packages  Hash Sum mismatch
    
    W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/universe/binary-amd64/Packages  Hash Sum mismatch
    
    W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/universe/source/Sources  Hash Sum mismatch
    
    W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/universe/binary-amd64/Packages  Hash Sum mismatch
    
    E: Some index files failed to download. They have been ignored, or old ones used instead.
    

  • How to access environment variables in grunt application *after* it has been built
  • ECONNREFUSED 127.0.0.1:3306 to mysql container inside jenkins
  • Failing to delete Docker's images after terminating the container
  • Docker - can you over-allocate ram (tomcat)?
  • Airbnb Airflow using all system resources
  • Running java command with Docker exec fails with “no such file or directory”
  • 3 Solutions collect form web for “Docker RUN apt-get -y update && apt-get install -y fortunes”

    run this command before apt-get update:

    sudo rm -rf /var/lib/apt/lists/*
    

    You’ve run out of space. Or more precisely, the amount of space dedicated to docker assets has been exceeded.

    Try this (on the host machine):

    $ docker rmi $(docker images -q)
    

    Or this: https://hub.docker.com/r/martin/docker-cleanup-volumes/

    Adding apt-get clean before the apt-get update solves my problem. You can try it.

    The Dockerfile should look like this:

    FROM docker/whalesay:latest
    RUN apt-get clean && apt-get -y update && apt-get install -y fortunes
    CMD /usr/games/fortune -a | cowsay
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.