I am very new to Docker. I need add packer to docker image. So I used following Dockerfile to solve my problem.
FROM jenkinsci/jnlp-slave
USER root
RUN apt-get update && apt-get install -y unzip
RUN wget https://releases.hashicorp.com/packer/1.3.2/packer_1.3.2_linux_amd64.zip
RUN unzip packer_1.3.2_linux_amd64.zip -d packer
RUN mv packer /usr/local/
RUN export PATH=$PATH:/usr/local/packer/
ENTRYPOINT ["packer"]
I can build this successfully. But when I execute this I got following error.
starting container process caused "exec: \"packer\": executable file not found in $PATH": unknown.
My aim is to create slave for jenkins using docker. That slave need to include packer. Thank you