Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Import Compose: Entrypoint not working #387

Open
madejackson opened this issue Jan 22, 2025 · 0 comments
Open

[BUG]: Import Compose: Entrypoint not working #387

madejackson opened this issue Jan 22, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@madejackson
Copy link
Contributor

madejackson commented Jan 22, 2025

What happened?

Container is not starting correctly after recreating via cosmos. The issue is the entrypoint-translation. On Creation, the entrypoint gets extracted from the dockerfile and added to the cosmos-compose wrongly.

What should have happened?

It should start container

How to reproduce the bug?

Use the following cosmos-compose, it fails to start the container.
It's not exclusive to this template, there are others which do not start as well.

{
  "services": {
    "mailu-fts_attachments": {
      "container_name": "mailu-fts_attachments",
      "image": "apache/tika:2.9.2.1-full",
      "environment": [
        // ...
      ],
      "labels": {
        "cosmos-auto-update": "true",
        "cosmos-force-network-mode": "cosmos-mailu-default",
        "cosmos.stack": "mailu",
        "maintainer": "Apache Tika Developers dev@tika.apache.org",
        "org.opencontainers.image.ref.name": "ubuntu",
        "org.opencontainers.image.version": "24.04"
      },
      "ports": [],
      "volumes": [],
      "networks": {
        "cosmos-mailu-default": {}
      },
      "routes": null,
      "restart": "unless-stopped",
      "devices": null,
      "expose": [],
      "entrypoint": "/bin/sh -c exec java -cp \"/tika-server-standard-${TIKA_VERSION}.jar:/tika-extras/*\" org.apache.tika.server.core.TikaServerCli -h 0.0.0.0 $0 $@",
      "runtime": "runc",
      "user": "35002:35002",
      "hostname": "tika",
      "network_mode": "cosmos-mailu-default",
      "healthcheck": {
        "test": [
          "CMD-SHELL",
          "wget -nv -t1 -O /dev/null http://127.0.0.1:9998/tika || exit 1"
        ],
        "interval": 10,
        "timeout": 5,
        "retries": 3,
        "start_period": 10
      }
    }
  }
}

I'm using this image for mailu

Other details

The Issue seems to be how cosmos translates the entrypoint (The default one inside the dockerfile)
Also only seems to be happening when /bin/sh -c is used.

Example which doesn't work:

Dockerfile:

ENTRYPOINT [ "/bin/sh", "-c", "exec java -cp \"/tika-server-standard-${TIKA_VERSION}.jar:/tika-extras/*\" org.apache.tika.server.core.TikaServerCli -h 0.0.0.0 $0 $@"]

Cosmos Compose:

      "entrypoint": "/bin/sh -c exec java -cp \"/tika-server-standard-${TIKA_VERSION}.jar:/tika-extras/*\" org.apache.tika.server.core.TikaServerCli -h 0.0.0.0 $0 $@",

System details

  • OS: [e.g. debian 12]
  • Browser [e.g. firefox]
  • Version [e.g. 0.18.0-2]
@madejackson madejackson added the bug Something isn't working label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant