docker images are stored in root user thus consuming my disk space

Hi my server is configured such that the free space for root user in it is very less. However the user created(suppose user1) has lot of space.
The docker images which are getting created by docker are saved in the root user thus consuming space and making my jobs to fail.How can i make docker images use user1?

Do i need to restart the registry in anyway?

  • Docker: Unable to execute RUN command after ADD when starting from scratch
  • Using sudo inside a docker container
  • How can I mount a file in a container, that isn't available before first run?
  • Default private registry in Docker
  • Can I use a Github repository as the source of a Docker image?
  • How to RUN and Login to a container to debug ?
  • I am unable to understand how to use docker groups and -G tag for this purpose.

    Can i mention something in dockerfile and make images up using user1 ?

  • Docker - check within the container if a directory is mounted from the host or not
  • Error using mount command within Dockerfile
  • Start Docker Containers In Specific Order After Reboot
  • How to get a list of components and related assets out of Nexus3?
  • Docker Eureka UnknownHostException
  • Fedora 22: ERROR: No module named '_rpmb' while building docker
  • 2 Solutions collect form web for “docker images are stored in root user thus consuming my disk space”

    Checkout the -g option on the daemon process. Can be used to locate the docker home on an alternative disk volume.

    Explained in the following documentation links:

    Linked /var to /user1/var.

    The mounts and the volumes stay the same.

    I did this:

    `telinit 1 
    cp -pR /var /user1/var 
    mv /var /var.old 
    ln -s /user1/var /var 
    telinit 2` 
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.