Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning about svg support missing #1789

Merged
merged 3 commits into from
Nov 15, 2022
Merged

Fix warning about svg support missing #1789

merged 3 commits into from
Nov 15, 2022

Conversation

modzilla99
Copy link
Contributor

This fixes #1414 by adding the appropriate package in all of the supported flavors.

@CorneliousJD
Copy link

Thanks. This kind of PR has been submitted before and closed with a "wontfix" but then they close the issue topic... not sure why there's little communication here about what's happening but i hope they can agree to either accept this or just remove the dang warning.

@modzilla99
Copy link
Contributor Author

Hm, it sounded like @pierreozoux would be a part of it and finally allow the change... This has been really annoying for quite a long time. The team should totally decide if they see it as a security risk or not...

@J0WI J0WI added wontfix and removed wontfix labels Jul 15, 2022
@pierreozoux
Copy link
Member

@CorneliousJD Did you follow this discussion?
#1414

I think the community of people using this docker image is in favor of this change.

I also tried to change the warning message, and this was the response:
nextcloud/server#31742 (comment)
So basically it looks like imagemagick is only used to generate initials icon.
So it looks to me that it is not used for user images, so the atack surface is low.

I'm in favor of this change, from what I know and understand.

But people keep coming here, on this issue, so, we as a community have to fix it.
(Either change this warning, or add it to our package)

@yogo1212
Copy link

Call me stupid - but why even bother generating previews for SVG containing a circle and one or two letters?
The SVG should already be very small.
Is that worth making this controversial change?
'Security' is one of the core values of Nextcloud and this is not only a compromise - it's kompromat.

We usually accept longer load times, higher CPU load, and higher use of bandwidth when it comes to security.
Is there anyone not using TLS here?
I'd much rather see the Nextcloud server remove the warning and maybe even all references to Imagemagick altogether.

@keunes
Copy link

keunes commented Aug 17, 2022

why even bother generating previews for SVG containing a circle and one or two letters?

@yogo1212 From nextcloud/server#31742 (comment) it seems that it's not just for the avatars (initials-in-circles), but also "themed favicons and app icons when the base logo is an svg". I'd agree with you for the 'avatars', but if this improves things for themed favicons & app icons, I reckon it makes sense to merge this still.

modzilla99 and others added 3 commits November 14, 2022 20:16
Signed-off-by: Justin Lamp <[email protected]>
php extension is already present, so only install imagemagick

Signed-off-by: modzilla99 <[email protected]>
@modzilla99
Copy link
Contributor Author

Any interest in this getting merged?

@pierreozoux pierreozoux merged commit dfb538c into nextcloud:master Nov 15, 2022
@mcnesium
Copy link

tenor-3954988837

docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Nov 15, 2022
Changes:

- https///github.com/nextcloud/docker/commit/dfb538c: Fixes warning about svg support missing (https///github.com/nextcloud/docker/pull/1789)
- https///github.com/nextcloud/docker/commit/625445f: Bump to 24.0.7
@dkadioglu
Copy link

In the image 25.0.1-fpm:latest, built one day ago, the warning is still there. As far as I have understood, it should be gone after merging this now. Am I wrong here?

@mgutt
Copy link

mgutt commented Nov 26, 2022

Would be really nice. Or at least it should be realized through an option which can be enabled by a container variable. I mean, how many issues should be opened?

@BentHaase
Copy link

In the image 25.0.1-fpm:latest, built one day ago, the warning is still there. As far as I have understood, it should be gone after merging this now. Am I wrong here?

I am also puzzled.

@CorneliousJD
Copy link

I am also still seeing the warning. Im not sure why if this was actually merged and associated issues were closed as resolved?

@Ramalama2
Copy link

Same here, whats wrong here?
Im using nextcloud:latest, so even same on the apache version xD

docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Nov 28, 2022
Changes:

- https///github.com/nextcloud/docker/commit/48f223f: Runs update.sh
- https///github.com/nextcloud/docker/commit/24440af: Enhance shell syntax (https///github.com/nextcloud/docker/pull/1868)
- https///github.com/nextcloud/docker/commit/c83394d: Update GitHub Actions to use new bashbrew action (https///github.com/nextcloud/docker/pull/1861)
- https///github.com/nextcloud/docker/commit/dfb538c: Fixes warning about svg support missing (https///github.com/nextcloud/docker/pull/1789)
- https///github.com/nextcloud/docker/commit/625445f: Bump to 24.0.7
@ThomasCr
Copy link

For me I installed alway php8-pecl-imagick on alpine container

@dkadioglu
Copy link

With the most recent image from 3 or 4 hours ago the same again. The weird thing is, if I build the image myself, using the Dockerfile from this repo, the warning is not shown anymore.

@keunes
Copy link

keunes commented Nov 29, 2022

I don't know really how such things work, and apologies if I'm using the wrong terminology. But did this change 'trickle down' to the docker-hosted image yet? And did anyone notice a difference between updating an existing installation/container vs creating a new container from scratch?

@mgutt
Copy link

mgutt commented Nov 29, 2022

And did anyone notice a difference between updating an existing installation/container vs creating a new container from scratch?

This is the same in the container world.

@keunes
Copy link

keunes commented Nov 29, 2022

This is the same in the container world

Configuration & data is persistent, no? But I guess from your reply that that would not affects this warning.

@mgutt
Copy link

mgutt commented Nov 29, 2022

Configuration & data is persistent

Each container uses specific paths for user config and data files. They are located "outside" of a container. Every update means a full fresh install while reusing those user files. For Nextcloud this path is /var/www/html as mentioned in the documentation in the paragraph "Persistent data":
https://hub.docker.com/_/nextcloud

@dkadioglu
Copy link

dkadioglu commented Nov 30, 2022

I've stumbled upon something, which might be the reason, that the most recent image at Docker Hub is still warning for the missing libimagick. If you look at the results of the last run of GitHub Actions of the nextcloud/docker repository: https://github.com/nextcloud/docker/actions/runs/3579183960/jobs/6020125259#step:6:13 There you can see, that libmagickcore-6.q16-6-extra is installed via apt:

RUN set -ex;         apt-get update;     apt-get install -y --no-install-recommends         rsync         bzip2         busybox-static         libldap-common         libmagickcore-6.q16-6-extra     ;     rm -rf /var/lib/apt/lists/*;         mkdir -p /var/spool/cron/crontabs;     echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data```

On the other hand, if you look at the content of the respective image 25.0.1-apache at the Docker Hub: https://hub.docker.com/layers/library/nextcloud/25.0.1-apache/images/sha256-7d38401f5a893f17fd1c1bf38bc81519f243cf914af6177f9b85e93a7837415d?context=explore There you can see in Layer 31, that libmagickcore-6.q16-6-extra is not installed via apt:

/bin/sh -c set -ex;         apt-get update;     apt-get install -y --no-install-recommends         rsync         bzip2         busybox-static         libldap-common     ;     rm -rf /var/lib/apt/lists/*;         mkdir -p /var/spool/cron/crontabs;     echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data

I don't know, if this difference is intended or not. Maybe someone, who knows the infrastructure and how GitHub and Docker Hub play together here, can check if this behaviour is intended and if not fix it.

@CorneliousJD
Copy link

I've stumbled upon something, which might be the reason, that the most recent image at Docker Hub is still warning for the missing libimagick. If you look at the results of the last run of GitHub Actions of the nextcloud/docker repository: https://github.com/nextcloud/docker/actions/runs/3579183960/jobs/6020125259#step:6:13 There you can see, that libmagickcore-6.q16-6-extra is installed via apt:

RUN set -ex;         apt-get update;     apt-get install -y --no-install-recommends         rsync         bzip2         busybox-static         libldap-common         libmagickcore-6.q16-6-extra     ;     rm -rf /var/lib/apt/lists/*;         mkdir -p /var/spool/cron/crontabs;     echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data```

On the other hand, if you look at the content of the respective image 25.0.1-apache at the Docker Hub: https://hub.docker.com/layers/library/nextcloud/25.0.1-apache/images/sha256-7d38401f5a893f17fd1c1bf38bc81519f243cf914af6177f9b85e93a7837415d?context=explore There you can see in Layer 31, that libmagickcore-6.q16-6-extra is not installed via apt:

/bin/sh -c set -ex;         apt-get update;     apt-get install -y --no-install-recommends         rsync         bzip2         busybox-static         libldap-common     ;     rm -rf /var/lib/apt/lists/*;         mkdir -p /var/spool/cron/crontabs;     echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data

I don't know, if this difference is intended or not. Maybe someone, who knows the infrastructure and how GitHub and Docker Hub play together here, can check if this behaviour is intended and if not fix it.

Well this certainly seems to be the answer as to why our nextcloud:latest containers don't have it - it's not actually present in the image. Someone will need to address/correct this build it would seem.

@Ramalama2
Copy link

The actual Dockerfile:
https://github.com/nextcloud/docker/blob/master/25/apache/Dockerfile

And what the dockerhub uses:
https://github.com/nextcloud/docker/blob/739d6996409825bc61000f0c901ea05fbe3debf7/25/apache/Dockerfile

The dockerhub needs an update it seems, cause its fixed somewhat to this tag.
however, i checked the differences, because i was worried that more "pull requests" are missing...

root@Docker:~# diff Dockerlatest Dockerhub
13d12
<         libmagickcore-6.q16-6-extra \
root@Docker:~#

But no, only libmagickcore is missing :-)

@dkadioglu
Copy link

The build from today is again without ImageMagick.

@Ramalama2
Copy link

The build from today is again without ImageMagick.

The builds are broken, docker hub just builds always the same image 😂
Idk who maintains this dockerhub/docker image thing.
That one should be tagged here.

This here isn't modzillas fault, he can't anything for.
But whoever maintains this container need to update inside dockerhub the link to the docker file.

That's nothing anyone of us can do with a PR or sth like that.
Cheers

@dkadioglu
Copy link

The build from today is again without ImageMagick.

The builds are broken, docker hub just builds always the same image 😂 Idk who maintains this dockerhub/docker image thing. That one should be tagged here.

This here isn't modzillas fault, he can't anything for. But whoever maintains this container need to update inside dockerhub the link to the docker file.

That's nothing anyone of us can do with a PR or sth like that. Cheers

Absolutely right!
I did not want to blame anyone, but only to draw attention to it again, because unfortunately I also do not know whom to address.

@BentHaase
Copy link

@J0WI might be able to help here.

This user (could also be a bot) is the one pushing changes to the official docker-library/official-images . Also his username somewhat resembles the one generic user shown on Dockerhub (?) (just a wild guess):

image

doijanky


Maybe @tianon could assist here too / tell us who's in charge of the Dockerfile (sorry for tagging you if you are the wrong person!). He was once involved with a different Nextcloud Docker issue: docker-library/official-images#13135

@SuperSandro2000
Copy link
Contributor

doijanky is the CI user that is used in the infosiftr pipelines which push the official docker libraries.

The docker hub image gets updated when a PR like docker-library/official-images#13475 is created and merged.

dkadioglu added a commit to dkadioglu/official-images that referenced this pull request Dec 7, 2022
The last couple of recently built images are behind upstream. It would be great, if the missing commits could be included. This would i.a. fix nextcloud/docker#1789.
@dkadioglu
Copy link

The just built image for 25.0.2 on Docker Hub now contains ImageMagick! Perfect, thanks to the maintainers.

@BentHaase
Copy link

BentHaase commented Dec 9, 2022

The just built image for 25.0.2 on Docker Hub now contains ImageMagick! Perfect, thanks to the maintainers.

I have not seen this in a very long time. Thanks everyone involved in fixing this, especially @dkadioglu ❤️

image

ananace pushed a commit to ananace/docker-nextcloud that referenced this pull request May 10, 2024
* Include imagick in all flavours

Signed-off-by: Justin Lamp <[email protected]>

* Fix alpine imagick version

Signed-off-by: Justin Lamp <[email protected]>

* Changed alpine package to imagemagick
php extension is already present, so only install imagemagick

Signed-off-by: modzilla99 <[email protected]>

Signed-off-by: Justin Lamp <[email protected]>
Signed-off-by: modzilla99 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SVG imagemagick Nextcloud 21.0 Docker