FROM nextcloud:24.0.2 WORKDIR /usr/src/nextcloud RUN chown -R www-data:www-data . USER www-data ARG username ARG password RUN ./occ maintenance:install --admin-user admin --admin-pass "$password" --admin-email admin@example.com RUN OC_PASS="$password" ./occ user:add --password-from-env "$username" RUN ./occ app:install news RUN ./occ app:install notes RUN ./occ config:system:set trusted_domains 1 --value=10.0.2.2 ADD overlay /usr/src/nextcloud/