0

Is it possible instead of storing docker containers/images locally on my MacBook Pro (from docker build, or dockerfiles), to store them on a cloud storage provider like AWS S3 or Google Cloud Storage? My MacBook Pro only has 256GB of disk, and I am constantly running out of disk space and I have to run docker image prune -a.

Justin
  • 42,716
  • 77
  • 201
  • 296
  • Possible duplicate of [How to copy Docker images from one host to another without using a repository](https://stackoverflow.com/questions/23935141/how-to-copy-docker-images-from-one-host-to-another-without-using-a-repository) – Robert Moskal Jun 03 '19 at 18:49
  • External drives may be part of the solution here. Even a USB stick can help out and a 256GB USB 3.0 drive isn't that expensive. If you're really strapped for space you can also build your images on a cloud VM. – tadman Jun 03 '19 at 18:52

2 Answers2

1

There are a lot of services outthere were you can store your images, those are called docker registry hubs. Some of them are Dockerhub, Azure AKS, AWS ECR, Google also has its own. You can also create your own with docker registry as explained here.

caffreyd
  • 1,151
  • 1
  • 17
  • 25
0

You can store your images in repos on Docker Hub. They have a guide on how to do it, and you can also use this guide: https://ropenscilabs.github.io/r-docker-tutorial/04-Dockerhub.html

Beckett O'Brien
  • 176
  • 2
  • 16
  • When I run `docker build` it still does the build locally though. Docker push just pushes the finished container up to hub. – Justin Jun 03 '19 at 18:44
  • Do you want to build and store on the cloud? Or just store? – Beckett O'Brien Jun 03 '19 at 18:46
  • Just store. For example when I run `docker images` it shows about 30GB of images locally. – Justin Jun 03 '19 at 18:51
  • Your best bet is probably just to upload the built container to something like google drive, but if you want to have them running in the cloud, you will probably end up paying for something like an AWS EC2 instance. – Beckett O'Brien Jun 03 '19 at 19:00