Running yum update in fedora 21 makes a very large image

I have the fedora 21 image pulled,

fedora              21                  834629358fe2        5 weeks ago         250.2 MB

I create a Dockerfile

  • How can I set negative niceness of a docker process?
  • Port exposed by Docker not reachable
  • Docker Openshift Security unidirectional route
  • netcat for MySQL connection forwarding
  • Use encrypted client certificate to connect to a docker host
  • Searching for the most optimal solution with Django, Docker, virtualenv and structure of files [closed]
  • from fedora:21
    maintainer ...
    run yum -y update
    

    Then I do,

    sudo docker build -t eric/fedora:21 .
    

    But the size of this image is very large, about 650MB ,

    eric/fedora         21                  50cbf024d8f4        16 seconds ago      658.8 MB
    

    Is this OK, or am I doing something wrong?

  • Any suggestion for running Aerospike on Kubernetes on CoreOS on GCE?
  • Having error pushing docker container on Bluemix
  • Accessing Site Behind nginx-proxy via IP Address
  • Docker swarm use local service instance
  • Is it good practice to have my sites cert.key and cert.pem in a Nginx Docker container?
  • nfs volume mount to mysql docker container inside a ubuntu virtualbox fail
  • One Solution collect form web for “Running yum update in fedora 21 makes a very large image”

    As first attempt, it is good practice removing the yum cache (or any cache system, as apt) in your Docker image. In case of yum you can use yum clean all.

    If it doesn’t fix the issue, you can run an instance of fedora:21 container, run yum update manually, and check why it increases so much its size. Maybe there are some missing packages from fedora image that are installed when you run yum update (tip: to check easily all the files changed in the container you can use docker diff).

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.