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?

  • Issue while indexing data in solr in docker cluster setup
  • Laradock: how to enable/install php7 ldap support extension?
  • Using remote byebug instance with docker-compose
  • Is Docker image updated incrementally in production environment
  • Kubernetes + MySQL : Creating custom database and user in a Kubernetes container
  • What command can I use to find out the version of docker swarm I am using?
  • 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 : oci runtime error: exec: “/bin/bash”: stat /bin in windows 7
  • “Already connected” Exception when running jersey application inside docker container
  • side effect of --rm: when exit a container build with docker run --rm -v /myvol, also the volume is removed
  • Can't access docker url via curl or Postman
  • ADD command with network path in Windows Containers Dockerfiles
  • Can docker overlay networks bind to a single specific parent network interface?
  • 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.