Back in July, I had a couple of posts how to get a ‘dockerized’ version of OnlyOffice to play with Nextcloud. The docker-compose.yml files I found at the time in the developer company’s resources downloaded and then built the OnlyOffice image locally. There’s nothing wrong with that, but it takes a bit to startup the first time and the update procedure is a bit different from just pulling a new image version from Docker Hub. But there is a Docker Hub image available for the DocumentServer part of OnlyOffice, so let’s have a look at how to use it.
Only a few lines in the docker-compose.yml file need to be modified to switch from a locally built image to the one on Docker Hub. Here’s the section that needs to be modified:
services: onlyoffice-documentserver:build:context: .container_name: onlyoffice-documentserver depends_on: - onlyoffice-postgresql - onlyoffice-rabbitmq
And here is how it has to be modified to pull the image from Docker Hub instead:
services: onlyoffice-documentserver: container_name: onlyoffice-documentserver image: onlyoffice/documentserver depends_on: - onlyoffice-postgresql - onlyoffice-rabbitmq
Obviously a ‘docker-compose down‘ should be done before making these changes. And as a lot of things are no longer required when the DocumentServer is no longer build locally, it’s best to create a new directory, copy and paste the original docker-compose.yml file into it, modify it and then do a ‘docker-compose up -d’ in the new directory. This way, all the crud can be removed once you are happy with the new configuration.
And that’s all there is to it!