The Problem
Today I was doing some local testing with OBIEE (Oracle Business Intelligence 12c) and Oracle Database 12 within Docker. Now typically due to the size of the Oracle installers and resource usage I would install these on VMs, but today I am writting deployment scripts – And I need the ability to build up and tear down quickly, over and over.
The problem is, I only have about 20GB diskspace free on my laptop’s SSD. The database image alone takes up 6GB, OBIEE another 6GB, and I still need additional development space. It’s a little too close for my liking.
This is a problem that does not affect me too often, but I figure I better write it down for when I need it again. Usually if I am working with docker for development my typical images only take up about 200MB.
The Solution
Luckily I have a USB-3 external 2TB drive that I use at my desk for when I am working on such large projects.
- Stop Docker
bash [root@amartin ~]# systemctl stop docker
- Backup Docker
bash [root@amartin ~]# cp -arp /var/lib/docker{,.bak}
- Move Docker to larger disk
bash [root@amartin ~]# mv /var/lib/docker /run/media/amartin/LinuxStoreage/
- Sym-link it
bash [root@amartin ~]# ln -s /run/media/amartin/LinuxStoreage/docker /var/lib/docker
- Start Docker
[root@amartin ~]# systemctl start docker
This is a temporary fix as I do not carry extra storage around with me. I alter my setup back once this work is all done.