Changes

From SME Server
Jump to navigationJump to search
1,482 bytes added ,  10:56, 16 September 2014
m
added save/load images section
Line 137: Line 137:     
To run a container in the background, you need to issue to docker run command with the -d flag instead of the -i flag
 
To run a container in the background, you need to issue to docker run command with the -d flag instead of the -i flag
 +
 +
 +
===Copy docker images===
 +
Docker images are stored on your local server. If you want to run the image on another machine you first have to take the image out of your local image repository and save the image in a transferable format. For this the ''save'' the image in .tar format. To get a listing of all available images on your local server:
 +
docker images
 +
will result in (example):
 +
[root@sme9 ~]# docker images REPOSITORY                TAG                IMAGE ID            CREATED            VIRTUAL SIZE sme9                      6.5                55db4355a2de        46 minutes ago      854.7 MB leszekk/centos_minimalcd  6.5                bc56fa8f1204        8 months ago        452.6 MBto get a copy of our sme9 image and save it as 'copyofsme9 you need to enter the following command: docker save sme9:6.5 > /tmp/copyofsme9.tarwhich will result in a copyofsme9.tar file in your /tmp directory of your local server. You can now copy/move this file to another server or simply archive it for later usage.
 +
 +
To use the copyofsme9.tar file on another server and use it on that server with Docker, we can load it into the repository of the new server: docker load < /downloads/copyofsme9.tarAfter Docker has loaded the file, you can check it's availability by executing: docker imagesand you can use it just like any other image on your new server. You can use the ''save'' and ''load'' commands to clean up your local repository and share copies of your image. 
 +
    
===Docker networking===
 
===Docker networking===

Navigation menu