Docker

From Wiki :-)
Revision as of 04:26, 11 February 2018 by Savoundg (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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