I want to run jpos (isoserver) within a docker container . So far I have found this image in Docker hub. I didn't able to found any details documentation about this image . Only few lines are available in readme .
I have found few Docker files and build was successful.But when I try to run , it takes me to a bash prompt.I have run this command
docker run -t -i jpos/ubuntu_trusty_jdk8 /bin/bash
No q2 server is running. No Logs are available in docker container when i try to run this command.
sudo docker logs 7c2661e82141
Can I use existing docker image for my requirements? If yes ,where are the details documentation for how to run, modify existing docker image ?
Can anybody help?
You can take a look at the Docker files .
If you use the jPOS-template , you can create a Dockerfile of your own, like this:
FROM jpos/ubuntu_jdk8:latest
ADD jpos/build/distributions/jpos*.tar.gz /
LABEL vendor="jPOS.org"
LABEL org.jpos.template="2.1.1 master/2a2874f"
RUN ln -s /jpos-2.1.1 /jpos
WORKDIR /jpos
CMD ["bin/q2"]
Then you can build your image with a script like this:
!/bin/bash
cd `dirname $0`
rm -fr jpos
git clone https://github.com/jpos/jPOS-template.git jpos
(cd jpos && gradle dist)
docker rmi jpos/template
docker build -t="jpos/yourproject" .
(You obviously clone from your project, based on jPOS-template).
Key points here:
gradle dist
creates a distribution in build/distributions
directory ADD jpos/build/distributions/jpos*.tar.gz /
in the Dockerfile expands the tarball inside your container. As the Dockerfile of the image, you are referring to uses: CMD ["bash"] which means it will execute bash.
You can create your own image using Dockerfile where the base image would be jpos/ubuntu_vivid_jdk8 and you can specify the default command using ENTRYPOINT or CMD. Please refer https://docs.docker.com/engine/reference/builder/#dockerignore-file
Please let me know if you need further help.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.