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-18 11:27] – [Maintenance] avoid error if no images to delete (use xargs -r) 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 71: | 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.1466242058.txt.gz · Last modified: 2016-06-18 11:27 by glen