Docker Community Forums

Share and learn in the Docker community.

Dockerfile CMD & ENTRYPOINT error


(Kleviat) #1

Hi, i’m trying to build a pentaho’s container, PDI carte specifically. I have a problem with the execution of the carte.sh command from pdi. I’m using CMD + ENTRYPOINT to do that. My Dockerfile is something like this


FROM java

ADD pdi.zip /
RUN unzip -q pdi / && rm pdi.zip

CMD [“0.0.0.0 8080”]
ENTRYPOINT /data-integration/carte.sh


The CMD and ENTRYPOINT statements are combined into a single sentence before execution, where cmd are entrypoint’s statement parameters.

The image was built correctly but when i try to instanciate an conteiner with this image, it show me the following error:

/data-integration is not a comand

thanks for your help and sorry for my bad english


(Djukevanhoof) #2

When defining a CMD statement using an array then each param should be a separate item in the array like this:
CMD [“0.0.0.0”, “8080”]

The same goes for the ENTRYPOINT statement, so that should be like:
ENTRYPOINT ["/data-integration/carte.sh"]

Take a look at the documentation about using CMD http://docs.docker.com/engine/reference/builder/


(Kleviat) #3

Thanks!!! I read the documentation and made corrections in the Dockerfile. Now the container it’s working properly