Bug 53878 - ports definition IPADDR:HOSTPORT:CONTAINERPORT in docker-compose.yml breaks appcenter
ports definition IPADDR:HOSTPORT:CONTAINERPORT in docker-compose.yml breaks a...
Status: NEW
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: App Center maintainers
App Center maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-10-06 09:11 CEST by Felix Botner
Modified: 2021-10-06 09:25 CEST (History)
0 users

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.086
Enterprise Customer affected?:
School Customer affected?:
ISV affected?: Yes
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2021-10-06 09:11:21 CEST
docker-compose.yml:
...
    ports:
      - 127.0.0.1:8080:8080
...

which is supported in v3 of the docker compose ports definition https://docs.docker.com/compose/compose-file/compose-file-v3/#ports

breaks the appcenter

Traceback (most recent call last):
  File "/usr/bin/univention-app", line 91, in <module>
    main()
  File "/usr/bin/univention-app", line 78, in main
    ret = args.func(args)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/__init__.py", line 226, in call_with_namespace
    result = self.main(namespace)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/install.py", line 84, in main
    return self.do_it(args)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/install_base.py", line 144, in do_it
    self._do_it(app, args)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/docker_install.py", line 71, in _do_it
    ret = super(Install, self)._do_it(app, args)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/install.py", line 114, in _do_it
    if self._install_app(app, args):
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/docker_install.py", line 65, in _install_app
    self._start_docker_image(app, hostdn, password, args)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/docker_base.py", line 154, in _start_docker_image
    docker.pull()
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/docker.py", line 444, in pull
    self.setup_docker_files()
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/docker.py", line 452, in setup_docker_files
    self._setup_yml(recreate=True)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/docker.py", line 519, in _setup_yml
    host_port, container_port = (int(_port) for _port in port.split(':'))
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/docker.py", line 519, in <genexpr>
    host_port, container_port = (int(_port) for _port in port.split(':'))
ValueError: invalid literal for int() with base 10: '127.0.0.1'
Comment 1 Felix Botner univentionstaff 2021-10-06 09:15:38 CEST
Workaround is to use 

ports:
      - 8080:8080

which exposes the port on all interfaces and that is sometimes not desired.