Procedure: In example I have 2 server AppServer1 and AppServer2. AppServer1 have internet and AppServer2 is behind the firewall without internet. So first we save docker image on AppServer1 and then copy to AppServer2. After copy to AppServer2 we load it from there.
- On AppServer1, we will pull httpd image from docker using below command
AppServer1> docker pull httpd:latest
- Once image pull from docker hub we save it to .tar.gz file in /images directory
AppServer1> docker save httpd:latest > /images/httpdlatest.tar.gz
- Now you need to copy httpdlatest.tar.gz file from AppServer1 to AppServer2 on /images location using SCP or any other way.
- Once Copy process completed you need to load image from AppServer1 using below command
AppServer2> docker load -i /images/httpdlatest.tar.gz
- You can find the images using docker images command
AppServer2> docker images
- You can run image using below command in AppServer2
AppServer2> docker run -d httpd:latest
No comments:
Post a Comment