Docker: Difference between revisions

From Wiki :-)
Jump to navigation Jump to search
Created page with "Docker is a container tool. == Set a custom docker folder == The `dockerd` daemon should be run with the --data-root argument to specify the root folder: /usr/bin/dockerd -..."
 
No edit summary
 
Line 1: Line 1:
Docker is a container tool.
Docker is a container tool.


== Set a custom docker folder ==
=== Set a custom docker folder ===


The `dockerd` daemon should be run with the --data-root argument to specify the root folder:
The `dockerd` daemon should be run with the --data-root argument to specify the root folder:
Line 9: Line 9:
Also, when the docker folder is copied from one place to another, the permissions should be preserved as follow:
Also, when the docker folder is copied from one place to another, the permissions should be preserved as follow:
cp -rpv old-docker new-docker
cp -rpv old-docker new-docker
=== How to know the content of an image? ===
First, you need to run the container associated with the image you want to analyse.
$(docker ps -ql) should give the container ID of the latest executed container.
Thus the following command lists the files in the image of the latest executed container:
docker export $(docker ps -ql) | tar tv

Latest revision as of 04:26, 11 February 2018

Docker is a container tool.

Set a custom docker folder

The `dockerd` daemon should be run with the --data-root argument to specify the root folder:

/usr/bin/dockerd --data-root /home/georges/home3/docker -H fd://

Also, when the docker folder is copied from one place to another, the permissions should be preserved as follow: cp -rpv old-docker new-docker

How to know the content of an image?

First, you need to run the container associated with the image you want to analyse.

$(docker ps -ql) should give the container ID of the latest executed container.

Thus the following command lists the files in the image of the latest executed container:

docker export $(docker ps -ql) | tar tv