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?

  • Docker or Docker for AWS and Deployment on AWS EC2
  • Accessing Hue on Cloudera Docker QuickStart
  • Custom MongoDb docker image
  • Docker image format
  • How can share Docker Volume UID with my host macOSx
  • New device node created on host does not get reflected in Docker container when using --device flag
  • Docker dnu restore fails
  • ElasticSearch in Windows docker image vm max map coun
  • Exclude starting some containers with Docker Compose
  • Docker Toolbox Windows Logging into
  • Can't get my php container to connect to the mysql container
  • Docker data volume and permission
  • 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.

    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.