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?

  • Minikube: how to ssh into the VM?
  • Kubernetes plugin containers can't connect back to Jenkins
  • How-to: Dockerfile layer(s) reuse / reference
  • Docker “Operation not permitted” issue on Windows
  • How to run cronjob in docker, and how to see the result?
  • Spring Boot & Docker
  • 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 ?

  • Start up docker container without dockerfile
  • How to clear properly the logs of docker container?
  • Install docker on RedHatLinux 6.7
  • Running a Self-Developed Python Server on Docker Container
  • Dockerfile for open-source project [duplicate]
  • Mount directory using docker-compose or dockerfile (without copying)
  • 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.