Docker image size

I pull a Docker image of about 0.5 GB in size on the Docker Hub. After pulling it on my Centos machine the size of the image became 1.6 GB. Pushing the image with a new name show 2 GB on the Docker hub.
How can I obtain an image with the same size on the Docker hub?

  • Stopping stubborn container?
  • How can I wait for a docker container to be up and running?
  • Paperclip on docker doesn't upload image?
  • accessing docker private registry
  • gitlab-runner with docker executor cannot find official images like maven:3.3.9-jdk-8
  • how to load dump on docker mysql container based on centos6?
  • datadog agent not reachable from inside docker container
  • Amazon EC2 boot time
  • Docker compose - share volume Nginx
  • kubernetes : PTY allocation request failed
  • Manage Kubernetes cluster from UI
  • How can I pass arguments to a docker container with a python entry-point script using command?
  • One Solution collect form web for “Docker image size”

    A similar issue was reported in issue 14204, for docker 1.7.0 on Ubuntu.
    (And by default, CentOS might not have the latest version of docker, so the first step would be to upgrade if possible)

    The questions to check were:

    1. How did you install docker?
    2. Can you provide the list the steps to reproduce the issue?
    3. Can you post the output from sudo du -sh /var/lib/docker/*
    4. You are using devicemapper as a storage driver, can you try using aufs?

    For the last point, as described in this article, check /etc/default/docker

    # Use DOCKER_OPTS to modify the daemon startup options.
    DOCKER_OPTS="--storage-driver=devicemapper"
    

    As the OP Dragomir Adrian confirms in the comments, it is a docker version issue: upgrading to 1.9.1 helps.

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