Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

entrypoint validation fails for the Shell form ENTRYPOINT #12572

@ryh-cc

Description

@ryh-cc

Context: I need to use the shell form ENTRYPOINT to be able to do variable substitution e.g.
ENTRYPOINT exec java -javaagent:dd-java-agent.jar ${JAVA_OPTS} -jar /app.jar.

It seems that container-structure-test does not support the shell form, as it fails when I run an entrypoint validation like so:

  entrypoint: ["/bin/sh", "-c", "exec", "java", "-javaagent:dd-java-agent.jar", "${JAVA_OPTS}", "-jar", "/app.jar"]

(I've also tried substituting JAVA_OPTS with a literal value)
and the test fails with the following error:

Error

=== RUN: Metadata Test
--- FAIL
duration: 0s
Error: Image entrypoint [/bin/sh -c exec java -javaagent:dd-java-agent.jar ${JAVA_OPTS} -jar /app.jar] does not match expected entrypoint: [/bin/sh -c exec java -javaagent:dd-java-agent.jar ${JAVA_OPTS} -jar /app.jar]

Will this be supported and/or is there a workaround for this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions