SSL script not working for Docker installation

Do you want to: Report a bug
For feature suggestions, describe the result you would like to achieve in detail.
For bug reports, provide the steps to reproduce and if possible a minimal demo of the problem.

Step 1: Install DocSpace using the script provided in the documentation (tested both community and enterprise editions)
Step 2: Do configuration on WebUI
Step 3: Run ssl script (tested on both community and enterprise edition)

DocSpace version: 2.5.1.1
Type of installation of the DocSpace (docker, deb/rpm, exe, please point us to the installation guide that you used as well): Docker
OS: Ubuntu 22.04
Browser version: Firefox but not important for this issue
Additional information: After sucesfully installing DocSpace Community or Enterprise and doing the WebUI configuration and custom domain setup i ran the ssl script mentioned in the docs Switching your DocSpace to HTTPS when installing using Docker - ONLYOFFICE and i got the error below:

Recreating onlyoffice-proxy ... 

ERROR: for onlyoffice-proxy  'ContainerConfig'

ERROR: for onlyoffice-proxy  'ContainerConfig'
Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 33, in <module>
    sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 81, in main
    command_func()
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 203, in perform_command
    handler(command, command_options)
  File "/usr/lib/python3/dist-packages/compose/metrics/decorator.py", line 18, in wrapper
    result = fn(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1186, in up
    to_attach = up(False)
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1166, in up
    return self.project.up(
  File "/usr/lib/python3/dist-packages/compose/project.py", line 697, in up
    results, errors = parallel.parallel_execute(
  File "/usr/lib/python3/dist-packages/compose/parallel.py", line 108, in parallel_execute
    raise error_to_reraise
  File "/usr/lib/python3/dist-packages/compose/parallel.py", line 206, in producer
    result = func(obj)
  File "/usr/lib/python3/dist-packages/compose/project.py", line 679, in do
    return service.execute_convergence_plan(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 579, in execute_convergence_plan
    return self._execute_convergence_recreate(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 499, in _execute_convergence_recreate
    containers, errors = parallel_execute(
  File "/usr/lib/python3/dist-packages/compose/parallel.py", line 108, in parallel_execute
    raise error_to_reraise
  File "/usr/lib/python3/dist-packages/compose/parallel.py", line 206, in producer
    result = func(obj)
  File "/usr/lib/python3/dist-packages/compose/service.py", line 494, in recreate
    return self.recreate_container(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 612, in recreate_container
    new_container = self.create_container(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 330, in create_container
    container_options = self._get_container_create_options(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 921, in _get_container_create_options
    container_options, override_options = self._build_container_volume_options(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 960, in _build_container_volume_options
    binds, affinity = merge_volume_bindings(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 1548, in merge_volume_bindings
    old_volumes, old_mounts = get_container_data_volumes(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 1579, in get_container_data_volumes
    container.image_config['ContainerConfig'].get('Volumes') or {}
KeyError: 'ContainerConfig'

Any relevant details about the situation. If you’ve modified configuration files or are using a proxy server that might affect the situation, please mention it. You can also attach images and videofile to the post (or to place them to external storage)

No modifications were done prior or post installation. Only the script as per documentation were used.

Hello @irdi

Please specify version of Docker and also let us know which command did you use exactly to switch DocSpace to HTTPS.


By the way, if you have active license for DocSpace Enterprise, you can contact us via Zendesk to get prompt replies.

Hey Constantine,

I have contacted through Zendesk, but I wanted to engage the community and also have the solution public for anyone who might encounter the same issue.

I have the latest docker version installed, and I used the command provided in the documentation

bash docspace-install.sh docker --letsencryptmail user@example.com --letsencryptdomain yourdomain.com

For now I stopped trying with Docker, but as soon as I can, I will continue testing and if I find a solution I will post it here.

Thank you

1 Like

I see. By the way, I was able to get some more information about use case:
In general, first command of the guide is used to install DocSpace and automatically switch it to HTTPS when executed:

bash docspace-install.sh docker --letsencryptmail user@example.com --letsencryptdomain yourdomain.com

However, your use case is different, you already had DocSpace running, so instead you should’ve used second command to swtitch your instance to HTTPS:

bash /app/onlyoffice/config/docspace-ssl-setup user@example.com yourdomain.com

We are aware that the difference between these commands is not quite clear, the guide in Help Center will be corrected to provide more clarity. Sorry for inconvenience caused.

1 Like

Hey Constantine,

Thanks for your answer, but I have tried both of them on fresh setups and also on existing setups and the error is still the same. Somehow after the SSL is generated it does not manage to restart the proxy container, by what I understood due to some permissions issue.

Thanks again,

Irdi

May I ask you to try using either of these commands (one to start DocSpace with HTTPS or other to apply SSL certificates to launched DocSpace) on clean machine for testing purposes? It could be related to the cached error in Docker.

Workaround found:

  1. delete the newly created copy of the [something]-onlyoffice-proxy container
  2. go in: /app/onlyoffice/config
  3. run docker-compose -f proxy-ssl.yml up -d

This should fix the (docker-compose) issue in recreating the container.

2 Likes

Hello @dmz

Thanks for sharing your workaround.

Thanks a lot for the workaround!