-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Install custom app from occ when nextcloud finished to be installed - Dockerfile #820
Comments
The solution I used in my custom entrypoint is to execute the nextcloud entrypoint. Then, I do a while until apach2 is run. Finally, I can run some configuration commands with occ.
It's maybe not clean, but it does the work. |
Pretty cool trick :) The custom entrypoint script must keep the container running though, one may end the script with |
@rere-rere even though your small hack works I thing it would be cleaner to install any custom apps right inside the Here is my (not perfect) solution on installing custom nextcloud apps, using a docker environment variable. I tested it with the And any feedback is very welcome! This is more or less just a proof of concept and not very good shell coding style ;) In your
Create folder
This way the normal entrypoint.sh script will be executed just before it starts nextcloud. Then all custom apps will be installed and enabled (or just enabled if they're already installed). Finally nextcloud is started. |
Thanks for this. To install multiple apps, I had to comment out the call to Thanks. |
I think it would be great to have a solution directly built into the original docker image. |
I'll just drop this for the next who stumbles across this thread: You don't need to copy the Nextcloud entrypoint script, which would require quite some maintenance on your part. The required steps (Nextcloud 20) are:
You can just mount this script into your container and run it. Docker-compose:
However, you may want to extend the script or write a wrapper, to ensure such installation steps only run once (or maybe to run multiple commands easily). |
This is a smart idea:
Source: nextcloud-fuss |
Here is the way I did it:
Benefits:
|
Closing in favour of #1964. |
Hello,
I created a Dockerfile from Nextcloud 16 and I would like to add some custom apps when the installation is finished. So, I decided to create a custom entrypoint where I launched the basic entrypoint "/entrypoint.sh apache2-foreground".
In order to install custom apps, I need to execute occ file with this command :
/var/www/html/occ app:install user_saml
But I need that Nextcloud has finished to be install. And I don't know how to deal with.
If anyone has any suggestions, I am grateful for that.
Best regards.
The text was updated successfully, but these errors were encountered: