|
|
|
ARG SERVER_VERSION=27.1.0@sha256:56be1d91f683065b8f36793570f4e704ef25cf309cd0f29c3d4b2e7d6c059b29
|
|
|
|
FROM nextcloud:$SERVER_VERSION
|
|
|
|
|
|
|
|
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
|
|
|
|
RUN ./occ config:system:set trusted_domains 1 --value="*"
|
|
|
|
RUN ./occ app:disable password_policy
|
|
|
|
|
|
|
|
RUN OC_PASS="user1" ./occ user:add --password-from-env --display-name "User One" user1
|
|
|
|
RUN OC_PASS="user2" ./occ user:add --password-from-env --display-name "User Two" user2
|
|
|
|
RUN OC_PASS="demo" ./occ user:add --password-from-env --display-name "Demo" demo
|
|
|
|
|
|
|
|
ADD dev/install_app_version /usr/local/bin/
|
|
|
|
|
|
|
|
ARG NEWS_VERSION=23.0.0
|
|
|
|
RUN install_app_version news https://github.com/nextcloud/news/releases/download/$NEWS_VERSION/news.tar.gz
|
|
|
|
|
|
|
|
ARG NOTES_VERSION=4.8.1
|
|
|
|
RUN install_app_version notes https://github.com/nextcloud-releases/notes/releases/download/v$NOTES_VERSION/notes.tar.gz
|
|
|
|
|
|
|
|
ARG UPPUSH_VERSION=1.4.0
|
|
|
|
RUN install_app_version uppush https://codeberg.org/NextPush/uppush/archive/$UPPUSH_VERSION.tar.gz
|
|
|
|
|
|
|
|
RUN ./occ app:enable password_policy
|
|
|
|
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 && \
|
|
|
|
# Do not setup the demo user here
|
|
|
|
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/
|