Skip to content

Instantly share code, notes, and snippets.

@leehambley
Forked from thieso2/docker
Created August 7, 2013 12:21
Show Gist options
  • Save leehambley/6173588 to your computer and use it in GitHub Desktop.
Save leehambley/6173588 to your computer and use it in GitHub Desktop.
# remove all images
$ docker rmi `docker images |sort -r| grep -v "^REPOSITORY" | awk '{print $3}'`
# remove all containers
$ docker rm `docker ps -a | awk '{print $1}'`
# min ubuntu image
$ mkdir /home/vagrant/new
$ debootstrap --variant=minbase --arch=amd64 precise /home/vagrant/new http://192.168.1.50:3142/ubuntu
$ cd /home/vagrant/new
$ tar cvfz ../min.tgz .
$ cat > Dockerfile
from scratch
add min.tgz /
^D
$ docker build -t "u1204min" .
$ docker run -i -t u1204min /bin/bash
HA!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment