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 use gitlab and/or docker for my web app?
  • Concourse CI and custom docker-compose
  • Should I use forever/pm2 within a (Docker) container?
  • Autoscale volume and pods simultaneously (Kubernetes)
  • How to use multiple base images with Docker?
  • Easy moving of environments: deploybot, docker or manual grunt/gulp setup?
  • 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?

  • Using GPU from a docker container?
  • running docker commands on host
  • Mount volume to Docker image on OSX
  • Attach terminal and launch docker compose?
  • Docker MongoDB : UserNotFound
  • Cannot get new connection from pool
  • 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.