User Tools

Site Tools


packages:docker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
packages:docker [2016-06-18 11:27] – [Maintenance] avoid error if no images to delete (use xargs -r) glenpackages:docker [2020-10-24 16:21] (current) – add php images link glen
Line 8: Line 8:
 ===== Prerequisites ===== ===== Prerequisites =====
  
-[[packages:kernel]] with ''USER_NS'', ''USER_NET'', etc.+  - [[packages:kernel]] with ''USER_NS'', ''USER_NET'', etc. 
 +  - vserver patch disabled (''docker exec'' will fail otherwise): 
 +    - https://groups.google.com/forum/#!topic/docker-user/U3j7ykSceNg 
 +    - http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2014-January/023786.html 
 + 
 +===== PLD Linux Base images ===== 
 + 
 +Minimal PLD Linux base images are built every Friday and published in GitLab: 
 + 
 +  * https://gitlab.com/pld-linux/pld#pld-linux-base-docker-images 
 + 
 +There's also available base images from Th snapshots: 
 +  * https://gitlab.com/pld-linux/pld/blob/master/README.md#snapshot-images 
 + 
 +<code> 
 +$ docker run --rm -it registry.gitlab.com/pld-linux/pld echo hello pld linux 
 +hello pld linux 
 +</code> 
 + 
 +To build your own base image, you can use [[https://github.com/moby/moby/blob/master/contrib/mkimage-pld.sh|contrib/mkimage-pld.sh]] as base. 
 + 
 + 
 +Additionally PHP base images are provided: 
 +  * https://gitlab.com/pld-linux/php
  
 ==== Setup Cgroups ==== ==== Setup Cgroups ====
Line 71: Line 94:
  
 For Docker < 1.9, see [[https://github.com/chadoe/docker-cleanup-volumes|docker-cleanup-volumes]] tool. For Docker < 1.9, see [[https://github.com/chadoe/docker-cleanup-volumes|docker-cleanup-volumes]] tool.
-===== PLD Base image ===== 
  
-Simple script to create new base image for pld: +For Docker >= 1.13 use ''docker {container,image,volume,network} prune'' subcommands.
- +
-<code bash mkimage-pld.sh> +
-#!/bin/sh +
-set -e +
- +
-ROOTFS=~/root +
-IMAGE=pld +
- +
-# to clean up: +
-docker rmi $IMAGE +
- +
-# build +
-rpm -r $ROOTFS --initdb +
- +
-install -d $ROOTFS/dev/pts +
-mknod $ROOTFS/dev/random c 8 -m 644 +
-mknod $ROOTFS/dev/urandom c 1 9 -m 644 +
-mknod $ROOTFS/dev/full c 1 7 -m 666 +
-mknod $ROOTFS/dev/null c 1 3 -m 666 +
-mknod $ROOTFS/dev/zero c 1 5 -m 666 +
-mknod $ROOTFS/dev/console c 5 1 -m 660 +
- +
-poldek -r $ROOTFS --up -u bash iproute2 coreutils poldek +
- +
-# 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@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/]]. +
- +
-alsoyou can try [[people:glen|glen's]] [[https://index.docker.io/u/glen/pld/|pld test]] image: +
-<code bash> +
-vagrant@pld64 ~$ sudo docker run -i -t glen/pld bash +
-root@ae0aac5de155 ~#  +
-</code>+
  
 ===== Vagrant ===== ===== Vagrant =====
packages/docker.1466242058.txt.gz · Last modified: 2016-06-18 11:27 by glen

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS PLD Linux Driven by DokuWiki