containers icon indicating copy to clipboard operation
containers copied to clipboard

Error when try to start image

Open daventt opened this issue 1 year ago • 9 comments

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

daventt avatar Oct 28 '24 09:10 daventt

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

sxa avatar Oct 28 '24 12:10 sxa

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 avatar Oct 28 '24 13:10 gdams

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

gdams avatar Oct 28 '24 13:10 gdams

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: - $SERVER_HOST_PORT:8080 environment: - ecc.. volumes: - $LOG_FOLDER:/logs - $STORAGE_FOLDER:/storage

daventt avatar Oct 29 '24 07:10 daventt

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

gdams avatar Oct 29 '24 09:10 gdams

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

daventt avatar Oct 29 '24 10:10 daventt

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

gdams avatar Oct 29 '24 10:10 gdams

I have the same problem. My dockerfile is just:

FROM eclipse-temurin:21
COPY . .
CMD ["./gradlew", ":core:flywayMigrate", "--stacktrace"]

jabari-pulliam avatar Nov 12 '25 08:11 jabari-pulliam

I have the same problem. My dockerfile is just:

FROM eclipse-temurin:21
COPY . .
CMD ["./gradlew", ":core:flywayMigrate", "--stacktrace"]

From a quick test this is because the current directory when the CMD command is run is not where things are copied to - try with:

CMD ["../gradlew", ":core:flywayMigrate", "--stacktrace"]

sxa avatar Nov 12 '25 12:11 sxa