packages:docker
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| packages:docker [2016-06-09 14:59] – [Maintenance] glen | packages:docker [2020-10-24 16:21] (current) – add php images link glen | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| ===== Prerequisites ===== | ===== Prerequisites ===== | ||
| - | [[packages: | + | - [[packages: |
| + | - vserver patch disabled ('' | ||
| + | - https:// | ||
| + | - http:// | ||
| + | |||
| + | ===== PLD Linux Base images ===== | ||
| + | |||
| + | Minimal PLD Linux base images are built every Friday and published in GitLab: | ||
| + | |||
| + | * https:// | ||
| + | |||
| + | There' | ||
| + | * https:// | ||
| + | |||
| + | < | ||
| + | $ docker run --rm -it registry.gitlab.com/ | ||
| + | hello pld linux | ||
| + | </ | ||
| + | |||
| + | To build your own base image, you can use [[https:// | ||
| + | |||
| + | |||
| + | Additionally PHP base images are provided: | ||
| + | * https:// | ||
| ==== Setup Cgroups ==== | ==== Setup Cgroups ==== | ||
| Line 36: | Line 59: | ||
| | | ||
| + | |||
| + | ===== Rights ===== | ||
| + | |||
| + | Don't run docker as '' | ||
| + | |||
| + | <note tip> | ||
| + | By adding yourself to the docker group you are effectively granting yourself full root permissions. For more information please read [[https:// | ||
| + | </ | ||
| + | |||
| + | Whoever, we still consider that more secure approach than just running as root. Accidental damage to Host system is minimized this way. | ||
| ===== How To ===== | ===== How To ===== | ||
| Line 51: | Line 84: | ||
| < | < | ||
| docker images --filter dangling=true | docker images --filter dangling=true | ||
| - | docker rmi $(docker images --filter dangling=true --quiet) | + | docker images --filter dangling=true --quiet |
| </ | </ | ||
| Line 61: | Line 94: | ||
| For Docker < 1.9, see [[https:// | For Docker < 1.9, see [[https:// | ||
| - | ===== PLD Base image ===== | ||
| - | Simple script to create new base image for pld: | + | For Docker |
| - | + | ||
| - | <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/ | + | |
| - | mknod $ROOTFS/ | + | |
| - | mknod $ROOTFS/ | + | |
| - | mknod $ROOTFS/ | + | |
| - | mknod $ROOTFS/ | + | |
| - | mknod $ROOTFS/ | + | |
| - | mknod $ROOTFS/ | + | |
| - | + | ||
| - | poldek -r $ROOTFS --up -u bash iproute2 coreutils poldek | + | |
| - | + | ||
| - | # cleanups | + | |
| - | PKGS=" | + | |
| - | for pkg in $PKGS; do | + | |
| - | rpm -r $ROOTFS -q $pkg && rpm -r $ROOTFS -e $pkg --nodeps | + | |
| - | done | + | |
| - | + | ||
| - | # and import | + | |
| - | tar -C $ROOTFS -cf- . | docker | + | |
| - | + | ||
| - | # and test | + | |
| - | docker run -i -u root $IMAGE /bin/echo Success. | + | |
| - | </ | + | |
| - | + | ||
| - | < | + | |
| - | # sh -x / | + | |
| - | + rpm -r / | + | |
| - | + 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) | + | |
| - | </ | + | |
| - | + | ||
| - | You can see more available samples in [[https:// | + | |
| - | + | ||
| - | also, you can try [[people: | + | |
| - | <code bash> | + | |
| - | vagrant@pld64 ~$ sudo docker run -i -t glen/pld bash | + | |
| - | root@ae0aac5de155 ~# | + | |
| - | </ | + | |
| ===== Vagrant ===== | ===== Vagrant ===== | ||
packages/docker.1465477195.txt.gz · Last modified: 2016-06-09 14:59 by glen