diff --git a/tool/Dockerfile.dev b/tool/Dockerfile.dev index 988f86f7..b9e5579c 100644 --- a/tool/Dockerfile.dev +++ b/tool/Dockerfile.dev @@ -1,5 +1,7 @@ -FROM nextcloud:27.0.0-fpm-alpine +FROM nextcloud:27.0.0 WORKDIR /usr/src/nextcloud +RUN chown -R www-data:www-data . +USER www-data RUN ./occ maintenance:install --admin-pass admin --admin-email admin@example.com RUN ./occ config:system:set allow_local_remote_servers --value=true @@ -18,5 +20,3 @@ RUN (sh /entrypoint.sh php -S 0.0.0.0:8080 &) && \ until curl -s -o /dev/null http://localhost:8080/status.php; do true; done && \ for user in admin user1 user2; do curl -u "$user:$user" -H "ocs-apirequest: true" -s -o /dev/null http://localhost:8080/ocs/v2.php/cloud/user; done COPY --chown=www-data:www-data overlay /usr/src/nextcloud/ - -CMD ["php", "-S", "0.0.0.0:80"] diff --git a/tool/dev.sh b/tool/dev.sh index 7a7f984f..5d083b03 100755 --- a/tool/dev.sh +++ b/tool/dev.sh @@ -5,4 +5,4 @@ cd "$(dirname "$0")/.." ./tool/build-dev-container.sh echo "Running development instance on http://localhost. To access it in an Android Emulator use http://10.0.2.2" -docker run --rm -v nextcloud-neon-dev:/usr/src/nextcloud -v nextcloud-neon-dev:/var/www/html -p "80:80" --net="host" nextcloud-neon-dev +docker run --rm -v nextcloud-neon-dev:/usr/src/nextcloud -v nextcloud-neon-dev:/var/www/html -p "80:80" --add-host=host.docker.internal:host-gateway nextcloud-neon-dev diff --git a/tool/update.sh b/tool/update.sh index fd6c4aa9..b422e3c6 100755 --- a/tool/update.sh +++ b/tool/update.sh @@ -27,7 +27,7 @@ elif [ -d "external/nextcloud-$1" ]; then # shellcheck disable=SC2001 latest_version=$(echo "$latest_tag" | sed "s/^v//") if [[ "$1" == "server" ]]; then - sed -i "s/FROM nextcloud:.*/FROM nextcloud:$latest_version-fpm-alpine/" ../../tool/Dockerfile.dev + sed -i "s/FROM nextcloud:.*/FROM nextcloud:$latest_version/" ../../tool/Dockerfile.dev else sed -i "s/RUN \.\/occ app:install $1 .*/RUN .\/occ app:install $1 --force --allow-unstable # $latest_version/" ../../tool/Dockerfile.dev fi