Docker Commands

The Docker provider exposes some additional Vagrant commands that are useful for interacting with Docker containers. This helps with your workflow on top of Vagrant so that you have full access to Docker underneath.

To list available commands, either run docker with no parameters or executedocker help:

$ docker Usage: docker [OPTIONS] COMMAND [arg...] docker daemon [ --help | ... ] docker [ --help | -v | --version ]

-H, --host=[]: The socket(s) to talk to the Docker daemon in the format of tcp://host:port/path, unix:///path/to/socket, fd://* or fd://socketfd. A self-sufficient runtime for Linux containers. ... Depending on your Docker system configuration, you may be required to preface each docker command with sudo. To avoid having to use sudo with the docker command, your system administrator can create a Unix group called docker and add users to it.

If you want to enrich your career and become a professional in Docker, then visit Tekslate - a global online training platform: "Docker Training"   This course will help you to achieve excellence in this domain.

The following list of environment variables are supported by the docker command line

DOCKER_API_VERSION The API version to use (e.g. 1.19)

DOCKER_CONFIG The location of your client configuration files.

DOCKER_CERT_PATH The location of your authentication keys.

DOCKER_DRIVER The graph driver to use.

DOCKER_HOST Daemon socket to connect to.

DOCKER_NOWARN_KERNEL_VERSION Prevent warnings that your Linux kernel is unsuitable for Docker.

DOCKER_RAMDISK If set this will disable ‘pivot_root’.

DOCKER_TLS_VERIFY When set Docker uses TLS and verifies the remote.

DOCKER_CONTENT_TRUST When set Docker uses notary to sign and verify images. Equates to --disable-content-trust=false for build, create, pull, push, run.

DOCKER_CONTENT_TRUST_SERVER The URL of the Notary server to use. This defaults to the same URL as the registry.

DOCKER_TMPDIR Location for temporary Docker files.

For an in-depth understanding of Docker click on: