I have a .NET project with docker support, so I run docker-compose.yml with docker-compose.override.yml file - Windows OS with Linux docker containers.
My idea is to download all necessary images and then run that same docker-compose file without internet connection. So, i will have connection initially, download all the images, and then go offline and run the app.
Any idea how can I do that?
Do below steps
Then save/export those images in the tar file by using below command
docker save image_name > /image/mynewimage.tar
The go offline, copy those tar file on another or same machine and load those images by using below command
docker load < /image/mynewimage.tar
Then run normal docker run commands, you already have got all images locally hence docker will not try to get it download from the internet.
This should work, let me know if you need any help with this.
Please post your docker-compose file, if in case of any issue with above approach.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With