adoptium / containers

Repo containing the dockerfiles and scripts to produce the official eclipse-temurin containers.
https://hub.docker.com/_/eclipse-temurin/
Apache License 2.0
222 stars 96 forks source link

Error when try to start image #688

Open daventt opened 1 week ago

daventt commented 1 week ago

What are you trying to do?

When try to start image with docker compose, i receive following error:

With image eclipse-temurin:21.0.5_11-jdk-alpine: /__cacert_entrypoint.sh: exec: line 114: illegal option --

With image eclipse-temurin:21.0.4_7-jdk-alpine: /__cacert_entrypoint.sh: exec: line 104: illegal option --

Docker version 26.1.3, build b72abbb

Docker Compose version v2.29.7

sxa commented 1 week ago

Potentially related to https://github.com/adoptium/containers/pull/642 which is being called out in the release notes as resolving an issue relating to __cacert_entrypoint.sh although since you're using the 21.0.5+11 image I would expect it to have been resolved.

FYI @gdams as the owner of 642

gdams commented 1 week ago

Potentially related to #642 which is being called out in the release notes as resolving an issue relating to __cacert_entrypoint.sh although since you're using the 21.0.5+11 image I would expect it to have been resolved.

Unlikely as it's also broken in eclipse-temurin:21.0.4_7-jdk-alpine

@daventt can you give me a simple docker-compose file that I can use to recreate your issue?

I've been testing with this and it's running just fine:

services:
  test-app:
    image: eclipse-temurin:21.0.5_11-jdk-alpine
    command: ["java", "-version"]
docker compose up
gdams commented 1 week ago

For what it's worth the line that is throwing your error is:

https://github.com/adoptium/containers/blob/e78d85595512fba851c6d9e1eab37e1743557d56/21/jdk/alpine/entrypoint.sh#L114

This line is somewhat out of our control. We'd need to see what command you're passing to docker-compose to understand why this would fail

daventt commented 6 days ago

Hello, I don't use any commands in my configuration. The same yml file configuration works on windows but doesn't work on rhel 8.9

Whit image 21.0.4_7-jdk i've the following error:

/__cacert_entrypoint.sh: line 114: exec: --: invalid option exec: usage: exec [-cl] [-a name] [command [argument ...]] [redirection ...] exit code 2

File yml:

services: backendv3: container_name: test build: context: ./test-v1 dockerfile: ./java.Dockerfile ports:

gdams commented 6 days ago

@daventt I'll need to see the contents of your ./java.Dockerfile. Are you able to provide me with a minimal version?

daventt commented 6 days ago

Unfortunately it contains critical data, I'll try deleting line by line and see what happens. I'll update you in 2 days

gdams commented 6 days ago

Unfortunately it contains critical data, I'll try deleting line by line and see what happens. I'll update you in 2 days

one pointer I could give you is it could be that you're trying to run bash in some way? We don't install bash by default in our base images. You could try apk add bash and see if that fixes your problem