quarkusio / quarkus-images

Set of container images delivered for Quarkus
Apache License 2.0
110 stars 75 forks source link

Executable file not found when args without command is specified #180

Open iocanel opened 2 years ago

iocanel commented 2 years ago

Using ubi-quarkus-native-binary-s2i for binary s2i builds and creating a container using args but not command, for example:

    spec:
      containers:
        - args:
            - ARG1
            - ARG2
          env:
            - name: QUARKUS_HOME
              value: /home/quarkus/
            - name: QUARKUS_OPTS
              value: -Dquarkus.http.host=0.0.0.0
            - name: QUARKUS_LOG_CONSOLE_FORMAT
              value: "%d{HH:mm:ss,SSS} %s%e%n"
          image: my/app:1.0.0-SNAPSHOT

results in:

Error: container create failed: time="2021-10-14T08:03:53Z" level=error msg="container_linux.go:367: starting container process caused: exec: \"ARG1\": executable file not found in $PATH"

According to: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#define-a-command-and-arguments-when-you-create-a-pod the image entrypoint should be used along with the container args, but it doesn't seem to be the case here.