you may compare my two ansible playbooks.
both do nearly the same. install nextcloud.
(the docker version right now is still without the online offices suites. and in the ohter one i have to delete the empty folders.)
if you run them both you will mention that the docker one has less steps. while the non-docker version is doing a lot config stuff on the os level.
this config stuff is already done inside the docker image during build. (more or less a docker file is an installation skript.) to docker.io a complete installed images is pushed.
if you run the docker playbook with an
-e state=absent nextcloud is removed. nearly complete so you would get a “clean” machine again. (i would have to add same steps to remove everything.) to revered the installation without docker is a lot more work.
state=absent won’t remove your data. you run the playbook again and you can login to your nextcloud like nothing happened. if some updated one of the images in the mean time you will get the latest version. if you don’t like the update. you remove the container, pull an older image and you back online with your favorite version.
if your machine has enough power and you want to add other apps like rocket.chat, mattermost, etc., with the docker version you create a new task file in roles/docker_container/tasks and a new app is starting. (more or less. maybe a bit fine tuning.)
if you want anything changed in the image you download the docker file, add stuff to the installation script and you have your own image. but you should never login to the container and change anything within the container.