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

Bookmarks is missing php-gmp #854

Closed
brettinternet opened this issue Sep 5, 2019 · 21 comments · Fixed by #863
Closed

Bookmarks is missing php-gmp #854

brettinternet opened this issue Sep 5, 2019 · 21 comments · Fixed by #863

Comments

@brettinternet
Copy link

brettinternet commented Sep 5, 2019

Bookmarks now requires manually installing a required dependency which isn't optimal for a container (see nextcloud/bookmarks#792). Is it practical to include the php-gmp extension in the docker build?

The error reads:

App "Bookmarks" cannot be installed because the following dependencies are not fulfilled: The library gmp is not available

@SnowMB
Copy link
Contributor

SnowMB commented Sep 5, 2019

I would recommend to build a derived image on top of nextcloud and install the dependency.

See in the documentation and the examples.

@e-magon
Copy link

e-magon commented Sep 5, 2019

@brettinternet did you managed to resolve it? I tried to install php-gmp via apt install (inside the cointainer) but apt tells me that there are no install candidates.

Thank you

@ellis
Copy link

ellis commented Sep 5, 2019

@SnowMB What are the chances of php-gmp being installed in the standard Docker? I'm also unable to apt install php-gmp on nextcloud:16.0-fpm-alpine.

@brettinternet
Copy link
Author

brettinternet commented Sep 6, 2019

@e-magon @ellis Because containers are ephemeral, it's not practical to install this dependency manually via docker exec. What @SnowMB suggests is extending the Dockerfile, building from Nextcloud's container and adding something like:

RUN docker-php-ext-configure gmp; \
      docker-php-ext-install gmp

You could also consider using someone else's build, like linuxserver/docker-nextcloud.

@SnowMB Is the strategy here not to include any dependencies for Apps? I'd imagine this decision will affect quite a few people. It looks like the gmp package size is about 4.9 kb and installed 12 kb. While gmp isn't a required dep, it looks like it is recommended in the documentation for various apps. Note that exif is also considered "optional" for image rotation, but it's included.

@SnowMB
Copy link
Contributor

SnowMB commented Sep 6, 2019

@brettinternet good point about exif. In the beginning we agreed on the intent to keep the official image as small and basic as possible. There are so many variants that it's hard to support them all.

In the past we had many questions/discussions about smb (#19, #22, #60, #105, #474, #557, #578, #648, #754, #777) and imap (#19, #66, #372, #595, #756) which are also optional and not directly "supported". I hoped that documenting in the readme and giving examples would help, but building derived docker images seems a burden that many users don't want to do (Even so it's fairly simple in my opinion).

Recently we also made some contradictory decisions like #785 so it might be time to revisit this standpoint.

However I'm not very active in maintaining the image and even less sure what dependencies are needed for the internals of nextcloud and it's apps so @tilosp and @J0WI are the maintainers to ask. 😄

@J0WI
Copy link
Contributor

J0WI commented Sep 6, 2019

There's also a security perspective: #594 (comment)
I'm fine with gmp, but I have some doubts with ImageMagick and Samba. Especially for IMAP I also think it's easier to just run a container that provides a webmail service than trying to solve that with NextCloud. While PHP extensions are somewhat special, binaries like ImageMagick, Samba or LibreOffice can also be added with docker exec.

@brettinternet
Copy link
Author

@J0WI Dependency installations via docker exec wouldn't persist across upgrades, would they?

I understand this project has some difficult decisions regarding dependencies given the nature of Nextcloud and Apps. Thank you for your efforts in maintaining this repo!

@J0WI
Copy link
Contributor

J0WI commented Sep 6, 2019

Dependency installations via docker exec wouldn't persist across upgrades, would they?

Indeed you would have to register this as kind of a post run hook.

@dasbiswajit
Copy link

+1 from my side.

@paulcalabro
Copy link

If anyone needs a quick fix, I was able to resolve this by:

  • apt-get install libgmp-dev
  • docker-php-ext-install gmp
  • apachectl restart

@dasbiswajit
Copy link

Thanks I got it worked by following this link:
laradock/laradock#652 (comment)

@maxmeyer
Copy link

I would love to see this integrated. Currently the "Bookmark Addon" is "uninstallable" for a regular docker setup without workarounds.

From a security perspective I could imagine some "more" docker images regularly published along the basic one:

docker:14.0.14-apache-full (all dependencies for popular addons included)
docker:14.0.14-apache-graphic (just libs required for image, movie addons)

I could also imagine, that moving addons to separate docker containers/container images would solve the problem of having small basic containers, but also extend those easily. But you may need a "bridge" (container) to docker to install/start/stop addons. This would also open the ecosystem to non-php extensions. I think this would be a big change. I don't know the internal architecture of nextcloud, so I'm not sure if this is possible.

@dasbiswajit
Copy link

@maxmeyer you are right. it is effecting the Bookmark Android app which is based on Next Cloud Bookmark. Not able to use the latest version docker. Had a extensive discussion with @marcelklehr can some one look into this pull request?

@markuman
Copy link

@SnowMB What are the chances of php-gmp being installed in the standard Docker? I'm also unable to apt install php-gmp on nextcloud:16.0-fpm-alpine.

That's why alpine doesn't use apt as package manager. On alpine based image you have to do apk add php7-gmp

@J0WI
Copy link
Contributor

J0WI commented Sep 21, 2019

On alpine based image you have to do apk add php7-gmp

Docker has it's own way to install PHP extensions, see #854 (comment).

@marcelklehr
Copy link
Member

Help, is appreaciated. I'm currently stuck with the debian x86 targets, which fail for some reason.

@norweeg
Copy link

norweeg commented Oct 26, 2019

any updates? it looks like the PR that fixes this is hung up

@marcelklehr
Copy link
Member

@norweeg Feel free to take a look at the PR and try to make it work, I'm not really a docker wizard.

@norweeg
Copy link

norweeg commented Oct 26, 2019

@marcelklehr I am pretty sure I found the problem. I will add a comment to the PR

@dasbiswajit
Copy link

  • apachectl restart

If anyone needs a quick fix, I was able to resolve this by:

  • apt-get install libgmp-dev
  • docker-php-ext-install gmp
  • apachectl restart

This shoud be a treated as tempurary fix. @marcelklehr any reason why this has not taken care with the main docker image??

@marcelklehr
Copy link
Member

@dasbiswajit According to docker-library/official-images#6867, this issue is fixed in the current docker hub images. The solution you cited works out of the box for debian@x64 but for other platforms some tweaks were necessary.

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 a pull request may close this issue.