This is an old revision of the document!


Docker on Debian

Prerequisites

  • Packages installed: debootstrap and friends.
  • I use Debian testing/jessie (now stable), and put sid into sources.list so I can apt-get install docker.io, because docker.io removed from testing in late March 2015 and available only in sid.
  • Update your packages list
    # apt-get update
  • Install docker.io with:
    # apt-get install docker.io

Creating Docker Image

  • Use mkimage.sh to create Docker image
    $ sudo /usr/share/docker.io/contrib/mkimage.sh -t ${USER}/minbase debootstrap --variant=minbase --components=main --include=inetutils-ping,inetutils-traceroute,iproute jessie http://yourrepo/debian/
  • Try to run 'echo'
    $ sudo docker run -i ${USER}/minbase echo "hello citra"

Creating Docker Container

  • First, create a dockerfile for your container.

Frequently Used Commands

  • Show images:
    # docker images
    REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
    stwn/minbase        latest              d816657c5182        3 minutes ago       123.7 MB
    scratch             latest              511136ea3c5a        22 months ago       0 B
  • Show all running containers:
    # docker ps -a
  • Remove image:
    # docker rmi <image>
 
doc/docker.1430767348.txt.gz · Last modified: 2015/05/04 19:22 (external edit) · [Old revisions]
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki