packages:docker
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
packages:docker [2017-10-12 10:36] – [Prerequisites] glen | packages:docker [2020-10-24 16:21] (current) – add php images link glen | ||
---|---|---|---|
Line 12: | Line 12: | ||
- https:// | - https:// | ||
- http:// | - 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 75: | Line 96: | ||
For Docker >= 1.13 use '' | For Docker >= 1.13 use '' | ||
- | ===== PLD Base image ===== | ||
- | |||
- | Simple script to create new base image for pld: | ||
- | |||
- | <code bash mkimage-pld.sh> | ||
- | #!/bin/sh | ||
- | set -e | ||
- | |||
- | ROOTFS=~/ | ||
- | 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 import - $IMAGE | ||
- | |||
- | # 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.1507797370.txt.gz · Last modified: 2017-10-12 10:36 by glen