Closed armandabric closed 8 years ago
easy :)
docker exec -it -user www-data my_container bash
It's works! :tada: Thanks for the help.
or - in your own build - create a script /usr/bin/occ
(or somewhere else within the PATH) with the following content:
#!/bin/bash
su www-data -s /bin/bash -c "php /var/www/html/occ $@"
then you can for instance simply run
docker exec oc_container occ upgrade
(or even set a alias occ='docker exec oc_container occ'
)
@martingabelmann could you add this via an PR as /usr/local/sbin/occ
?
Just for documentation: For me docker exec -u www-data -it nextcloud /bin/bash
worked.
To easyly update a config value I want to use the
occ
CLI (see https://doc.owncloud.org/server/9.0/admin_manual/configuration_server/occ_command.html#setting-an-array-configuration-value) but as the image do not providesudo
it's impossible.From inside the container:
Own could I use the
occ
CLI with owncloud in a container?