FANDOM


Overview

References

  • References

Readings

Boot2Docker

Events

Storage

mkdir c:\var
"%VBOX_MSI_INSTALL_PATH%\VBoxManage" sharedfolder add default --name c/var --hostpath c:\var --automount
docker-machine ssh default sudo mkdir /c/var
docker-machine ssh defalut sudo mount -t vboxsf -o uid=1000,gid=50 c/var /c/var
 
docker run -v /c/var/opt:/var/opt:rw ...

Networking

misc

Repositories

Images

Software Docker Image Remarks
OpenSSH on Ubuntu https://hub.docker.com/r/rastasheep/ubuntu-sshd/ Dockerized SSH service, built on top of official Ubuntu images
CentOS systemd https://hub.docker.com/r/centos/systemd/ systemd enabled base container
InfluxDB https://hub.docker.com/r/tutum/influxdb/
WordPress https://hub.docker.com/r/_/wordpress/

Docker Compose

Swarm Mode

Docker Machine

Docker Toolbox

Companions

Kubernetes

  • http://kubernetes.io/
  • Desc. : an open-source system for automating deployment, scaling, and management of containerized applications.
  • License :
  • Sources :

cAdvisor

Tips

Identifying versions of Docker Engine, Docker Compose and Docker Machine

To indentify Docker Engine version

$ docker version --format '{{.Server.Version}}'

To identify Docker Compose version

$ docker-compose version

To identify Docker Machine version

$ docker-machine version

For more, refer the followings

Removing all containers in a single command-line

If there's no running container, just use

$ docker rm $(docker ps -a -q)

If there's running containers also, use one of the followings

$ docker rm -f $(docker ps -a -q)

or

$ docker stop $(docker ps -q)
$ docker rm $(docker ps -a -q)

Shell login to running docker container

In the following command line hyperledger_vp0_1 is the name of container to access.

$ docker exec -it hyperledger_vp0_1 /bin/bash

Inspect low-level information of container including configuration

$ docker inspect hyperledger_vp0_1

Inject configuration file into container deferring the built-in command

In the following example, hyperledger/fabric-couchdb's built-in command (/opt/couchdb/bin/couchdb) is deferred by being overriden at docker run command. The configuration file is injected using docker exec command with here-documents and then built-in command (/opt/couchdb/bin/couchdb) starting CouchDB is executed in another docker exec command.


#! /bin/bash

# For more on CouchDB configuration, refer
#   -http://docs.couchdb.org/en/2.0.0/config/
#   -http://docs.couchdb.org/en/2.0.0/config-ref.html : CouchDB configuration reference

name=couchdb0
port=${COUCHDB_PORT:-5984}

sudo rm -rf ~/docker/opt/couchdb/$name

docker run -itd \
--name $name \
-p $port:5984 \
-v ~/docker/opt/couchdb/$name/data:/opt/couchdb/data \
-v ~/docker/opt/couchdb/$name/var/log:/opt/couchdb/var/log \
hyperledger/fabric-couchdb /bin/bash

echo "Waiting 2 seconds for CouchDB to be launched completely."
sleep 2

docker exec -it $name bash -c "cat >> /opt/couchdb/etc/local.d/docker.ini << HERE
[log]
file = /opt/couchdb/var/log/couch.log
writer = file
level = ${COUCHDB_LOG_LEVEL:-info}
HERE"

echo "Waiting 2 seconds for 'docker exec' to be completed."
sleep 2

docker exec -itd $name "/opt/couchdb/bin/couchdb"

if [ $? -eq 0 ]; then
  echo ""
  echo "CouchDB container named '$name' has launched successfully."
  echo "Access 'http://localhost:$port/_utils' to manage $name."
  echo "Data files : '~/docker/opt/couchdb/$name/data' in host filesystem."
  echo "Log files  : '~/docker/opt/couchdb/$name/var/log' in host filesystem."
  echo ""
fi