lemur/nextcloud/containers
2022-10-16 14:59:08 -06:00
..
base Add base image containerfile 2022-10-03 18:52:23 -06:00
base-micro Add base image script 2022-10-14 10:40:52 -06:00
nginx Add container image creation scripts 2022-10-14 01:45:41 -06:00
php-fpm Add container image creation scripts 2022-10-14 01:45:41 -06:00
create_images.shlib Add create images shared library 2022-10-16 14:59:08 -06:00
README.md Update instructions 2022-10-14 10:41:58 -06:00

Nextcloud Container Images

Buildah

We choose to use the builadh approach instead of using Containerfiles because we're avoiding to install microdnf in the images. This saves about ~80 Mb from the generated images while allowing us to be in the CentOS ecosystem.

Build Images

Base image

cd base-micro
buildah unshare ./create_base_image.sh centos-micro 9

Nginx image

cd nginx
buildah unshare ./create_nginx_image.sh nginx-minimal 9

php-fpm image

cd php-fpm
buildah unshare ./create_php-fpm_image.sh php-php-minimal 9

Run containers

Run nginx and php-fpm inside a pod TODO: Create yaml files for this TODO: Add nextcloud configuration and application

podman run -d --rm -p8080:80 --name=nginx --pod new:web localhost/nginx-minimal:stream9
podman run -d --rm --pod web --name=php-fpm localhost/php-php-minimal:stream9

Test containers

echo '<?php phpinfo() ?>' > index.php
podman cp index.php nginx:/usr/share/nginx/html/
podman cp index.php php-fpm:/usr/share/nginx/html/
curl http://localhost:8080/index.php