mirror of
https://github.com/nextcloud/docker.git
synced 2025-06-17 08:34:48 +02:00
Removes VOLUME directive.
In a kubernetes env, this is causing a lot of issues. We want a read only docker image. And this helps. And as you see it removes a lot of logic that is always a good things to remove lines ;) The last logic piece that is needed, is to know if the Nc is installed or not, and we can get this from `occ status`. In term of upgrade Nobody will lost the data. There is just one thing, for people relying on /var/www/html/ is that the Nextcloud will not update anymore. But I guess people will realize and search what is happening. For convenience, we could put a warning in the entrypoint, and detect this case. What do you think? I know it is tricky to update these things, but I think we agree that we have to get rid of this old logic. Signed-off-by: pierreozoux <pierre@ozoux.net>
This commit is contained in:
parent
c4ccb67a0d
commit
e33f20dc92
6 changed files with 91 additions and 143 deletions
|
@ -103,7 +103,6 @@ RUN { \
|
|||
chown -R www-data:root /var/www; \
|
||||
chmod -R g=u /var/www
|
||||
|
||||
VOLUME /var/www/html
|
||||
%%VARIANT_EXTRAS%%
|
||||
|
||||
ENV NEXTCLOUD_VERSION %%VERSION%%
|
||||
|
@ -124,19 +123,23 @@ RUN set -ex; \
|
|||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
tar -xjf nextcloud.tar.bz2 -C /usr/src/; \
|
||||
tar -xjf nextcloud.tar.bz2 -C /var/www/; \
|
||||
rm -rf /var/www/html; \
|
||||
mv /var/www/nextcloud /var/www/html; \
|
||||
gpgconf --kill all; \
|
||||
rm -r "$GNUPGHOME" nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
rm -rf /usr/src/nextcloud/updater; \
|
||||
mkdir -p /usr/src/nextcloud/data; \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps; \
|
||||
chmod +x /usr/src/nextcloud/occ; \
|
||||
\
|
||||
rm -r "$GNUPGHOME"; \
|
||||
rm -rf /var/www/html/updater; \
|
||||
mkdir -p /var/www/html/data; \
|
||||
mkdir -p /var/www/html/custom_apps; \
|
||||
chmod +x /var/www/html/occ; \
|
||||
touch /var/www/html/data/.ocdata; \
|
||||
touch /var/www/html/config/config.php; \
|
||||
chown -R www-data:root /var/www/html; \
|
||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY *.sh upgrade.exclude /
|
||||
COPY config/* /usr/src/nextcloud/config/
|
||||
COPY *.sh /
|
||||
COPY --chown=www-data:root config/* /var/www/html/config/
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["%%CMD%%"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue