# 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 '' > 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 ```