I'm creating a Docker file that FROM's the official TOMCAT 8 docker file and also seeks to use the jar command to extract content from a WAR file so I install openjdk-7-jdk.

If I don't set the PATH as follows the jar command does not work

ENV PATH ${PATH}:/usr/lib/jvm/java-7-openjdk-amd64/bin

If I do set PATH as above tomcat won't start.

How do I resolve this?

FROM tomcat:8.0

RUN DEBIAN_FRONTEND=noninteractive \
    apt-get update --fix-missing --no-install-recommends && \
    apt-get install -y nano \
                     curl \
                     tree \
                     unzip \
                     openjdk-7-jdk --fix-missing --no-install-recommends

ENV PATH ${PATH}:/usr/lib/jvm/java-7-openjdk-amd64/bin


Thanks Conteh


1 Answer 1


It occurred to me that I could use the full path to the jar command /usr/lib/jvm/java-7-openjdk-amd64/bin/jar and remove the ENV PATH ${PATH}:/usr/lib/jvm/java-7-openjdk-amd64/bin which resolved the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.