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…

  • How to attach volume to a Docker container executor in Hadoop
  • ODBC Driver 13 for SQL Server can't open lib on pyodbc while connecting on ubuntu docker image
  • How do I deploy updated Docker images to Amazon ECS tasks?
  • Container files not updated when changed from the host mapped volume
  • Cannot remove dead docker containers. Storage driver: btrfs
  • Docker rm blocks concurrent runs
  • 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.
    

  • Setting up redis with docker
  • Is it practical to deploy an asterisk server using Docker?
  • Unable to push docker image to Openshift Origin Docker registry
  • does the FROM directive in a dockerfile allways pull the latest version of an image
  • Waiting for a Docker container to be ready
  • Is there a way to set the Docker container's mac address in docker-compose.yml file?
  • 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.