[PLDWWW] page changed: packages:lxc-docker

"Elan Ruusamäe (glen)" glen at pld-linux.org
Thu Aug 29 20:16:47 CEST 2013


reorganiz

--- https://www.pld-linux.org/packages/lxc-docker?rev=1377719793
+++ https://www.pld-linux.org/packages/lxc-docker
@@ -3,5 +3,57 @@
  [[https://www.docker.io/|Docker, The Linux container engine]] is an open source project to pack, ship and run any application as a lightweight container.
+ 
+ Have look at Docker [[https://www.docker.io/gettingstarted/|getting started]].
+ 
+ ===== PLD Base image =====
+ 
+ Simple script to create new base image for pld:
+ 
+ <code bash mkimage-pld.sh>
+ #!/bin/sh
+ set -e
+ 
+ ROOTFS=~/root
+ IMAGE=pld
+ 
+ # to clean up:
+ docker rmi $IMAGE
+ 
+ # build
+ rpm -r $ROOTFS --initdb
+ poldek -r $ROOTFS --up -u bash iproute2 coreutils
+ 
+ # cleanups
+ PKGS="cracklib-dicts ca-certificates"
+ for pkg in $PKGS; do
+     rpm -r $ROOTFS -q $pkg && rpm -r $ROOTFS -e $pkg --nodeps
+ done
+ 
+ # and import
+ tar -C $ROOTFS -cf- . | docker import - $IMAGE
+ 
+ # and test
+ docker run -i -u root $IMAGE /bin/echo Success.
+ </code>
+ 
+ <file>
+ # sh -x /vagrant/mkimage-pld.sh 
+ + rpm -r /home/vagrant/root --initdb
+ + poldek -r root --up -u bash iproute2
+ + docker import - pld
+ # docker run -i -t pld bash
+ WARNING: IPv4 forwarding is disabled.
+ [root at e8d2bb1215c2 /]# id
+ uid=0(root) gid=0(root) groups=0(root)
+ </file>
+ 
+ You can see more available samples in [[https://github.com/dotcloud/docker/tree/master/contrib|docker/contrib/]].
+ 
+ also, you can try [[/people/glen|glen's]] [[https://index.docker.io/u/glen/pld/|pld test]] image:
+ <code bash>
+ vagrant at pld64 ~$ sudo docker run -i -t glen/pld bash
+ root at ae0aac5de155 ~# 
+ </code>
  
  ===== Vagrant playground =====
  
  To play around inside [[vagrant]], create ''Vagrantfile'' and run ''vagrant up'' followed by ''vagrant ssh''.
@@ -56,56 +108,4 @@
      config.vm.box_url = BOX_URI
    end
  end
  </code>
- 
- And there, you can get familiar with [[https://www.docker.io/gettingstarted/|getting started]] samples.
- 
- There's also [[https://index.docker.io/u/glen/pld/|pld test]] image prepared, or [[#pld_base_image|build yourself]]:
- <code bash>
- vagrant at pld64 ~$ sudo docker run -i -t glen/pld bash
- root at ae0aac5de155 ~# 
- </code>
- 
- But you probably want to create your own with ''docker import'', see available samples in [[https://github.com/dotcloud/docker/tree/master/contrib|docker/contrib/]].
- 
- ===== PLD Base image =====
- 
- Simple script to create new base image for pld:
- 
- <code bash mkimage-pld.sh>
- #!/bin/sh
- set -e
- 
- ROOTFS=~/root
- IMAGE=pld
- 
- # to clean up:
- docker rmi $IMAGE
- 
- # build
- rpm -r $ROOTFS --initdb
- poldek -r $ROOTFS --up -u bash iproute2 coreutils
- 
- # cleanups
- PKGS="cracklib-dicts ca-certificates"
- for pkg in $PKGS; do
-     rpm -r $ROOTFS -q $pkg && rpm -r $ROOTFS -e $pkg --nodeps
- done
- 
- # and import
- tar -C $ROOTFS -cf- . | docker import - $IMAGE
- 
- # and test
- docker run -i -u root $IMAGE /bin/echo Success.
- </code>
- 
- <file>
- # sh -x /vagrant/mkimage-pld.sh 
- + rpm -r /home/vagrant/root --initdb
- + poldek -r root --up -u bash iproute2
- + docker import - pld
- # docker run -i -t pld bash
- WARNING: IPv4 forwarding is disabled.
- [root at e8d2bb1215c2 /]# id
- uid=0(root) gid=0(root) groups=0(root)
- </file>


Diff URL:
  https://www.pld-linux.org/packages/lxc-docker?do=diff&r1=1377719793&r2=1377800207
-- 
This mail was generated by DokuWiki at
https://www.pld-linux.org/


More information about the pld-cvs-commit mailing list