Skip to content

fix: add logic to detect and start existing UI container (#371)

Denis O requested to merge 371-dle-ui-container-starting into master

Description

MR adds logic to detect existing UI container and start it instead of trying to recreate it and fail

Related issue

Closes: #371 (closed)

Examples

$ docker run ...
$ docker ps
CONTAINER ID   IMAGE                     COMMAND                  CREATED         STATUS         PORTS                              NAMES
71a304f5ea2f   postgresai/ce-ui:latest   "/docker-entrypoint.…"   2 seconds ago   Up 1 second    2346/tcp, 127.0.0.1:2346->80/tcp   dblab_embedded_ui_ca2kiasvoad3k52u9f4g
fb8b40bd0279   dblab_server:local        "docker-entrypoint.s…"   3 seconds ago   Up 2 seconds   127.0.0.1:2345->2345/tcp           dblab_server

$ docker stop dblab_embedded_ui_ca2kiasvoad3k52u9f4g
$ docker stop dblab_server
$ docker rm dblab_server
$ docker stop dblab_server
$ docker ps -a
CONTAINER ID   IMAGE                     COMMAND                  CREATED          STATUS                      PORTS     NAMES
71a304f5ea2f   postgresai/ce-ui:latest   "/docker-entrypoint.…"   23 seconds ago   Exited (0) 15 seconds ago             dblab_embedded_ui_ca2kiasvoad3k52u9f4g
$ docker run ...
$ docker ps -a
CONTAINER ID   IMAGE                     COMMAND                  CREATED          STATUS         PORTS                              NAMES
485047a6dc1d   dblab_server:local        "docker-entrypoint.s…"   5 seconds ago    Up 4 seconds   127.0.0.1:2345->2345/tcp           dblab_server
71a304f5ea2f   postgresai/ce-ui:latest   "/docker-entrypoint.…"   37 seconds ago   Up 2 seconds   2346/tcp, 127.0.0.1:2346->80/tcp   dblab_embedded_ui_ca2kiasvoad3k52u9f4g

Checklist

  • MR description has been reviewed
  • MR changes are functionally tested
  • MR does NOT have text changes OR there are text changes and they have been reviewed
  • MR does NOT have API/CLI changes OR there are API/CLI changes and they have been reviewed
  • MR does NOT have UI changes OR there are UI changes and they have been reviewed

Closes #371 (closed)

Edited by Artyom Kartasov

Merge request reports