Public | Automated Build

Last pushed: 6 months ago
Short Description
Docker in a Docker (CentOS 7)
Full Description

Docker working in a Docker







Somtimes we all need to use docker in a docker. For this purpose this image was prepared and it's using latest version of docker from official repo. Docker Compose is installed too.

Basic usage

docker run \
  --name docker \
  -d \
  --privileged \
  million12/docker

Custom port usage

docker run \
  --name docker \
  -d \
  -e DOCKER_PORT=12345 \
  -p 12345:12345 \
  --privileged \
  million12/docker

make sure to use -p option which exports custom port to host machine
note: This image need to be run with --privileged option

Environmental Variables

DOCKER_PORT - Specify on which port docker daemon should listen.

Docker troubleshooting

Use docker command to see if all required containers are up and running:

$ docker ps

Check logs of docker container:

$ docker logs docker

Sometimes you might just want to review how things are deployed inside a running
container, you can do this by executing a bash shell through docker's
exec
command:

docker exec -ti docker /bin/bash

History of an image and size of layers:

docker history --no-trunc=true million12/docker | tr -s ' ' | tail -n+2 | awk -F " ago " '{print $2}'

Author

Author: Przemyslaw Ozgo (linux@ozgo.info)


Sponsored by Prototype Brewery - the new prototyping tool for building highly-interactive prototypes of your website or web app. Built on top of Neos CMS and Zurb Foundation framework.

Docker Pull Command
Owner
million12
Source Repository

Comments (0)