I did the following:
https://github.com/dockersamples/example-voting-app
cd example-voting-app
Inside that there are number of files/folders
MAINTAINERS
LICENSE
Jenkinsfile
ExampleVotingApp.sln
README.md
docker-stack-windows-1809.yml
docker-stack-simple.yml
docker-compose.yml
docker-compose-windows.yml
docker-compose-windows-1809.yml
docker-compose-simple.yml
docker-compose-k8s.yml
docker-compose-javaworker.yml
architecture.png
kube-deployment.yml
k8s-specifications
docker-stack.yml
docker-stack-windows.yml
result
vote
worker
I did cd vote
and executed following commands
docker build . -t voting-app
docker run -p 5000:80 voting-app
After I run docker run
command, I see the following output, and nothing is happening . I am clueless, as there is no error messages etc.
[root@osboxes vote]# docker run -p 5000:80 voting-app
[2020-06-16 17:59:27 +0000] [1] [INFO] Starting gunicorn 19.10.0
[2020-06-16 17:59:27 +0000] [1] [INFO] Listening at: http://0.0.0.0:80 (1)
[2020-06-16 17:59:27 +0000] [1] [INFO] Using worker: sync
[2020-06-16 17:59:27 +0000] [9] [INFO] Booting worker with pid: 9
[2020-06-16 17:59:27 +0000] [10] [INFO] Booting worker with pid: 10
[2020-06-16 17:59:27 +0000] [11] [INFO] Booting worker with pid: 11
[2020-06-16 17:59:27 +0000] [12] [INFO] Booting worker with pid: 12
Please guide how to fix this issue, and how to get the vote app running on container.
My OS details are as follows:
NAME="CentOS Linux"
VERSION="7 (Core)"
Thanks
2
Answers
After code checkout, I followed the following steps, and got the voting application to run.
change to vote directory
change to worker directory
change to result directory
Access the URLs
Replace the IP with IP of your machine. Now I can access both the URLs.
In my earlier answer, i got the app working, by building and running each image individually.
Finally, after spending few hours, I am finally able to create
docker-compose.yml
file and able to run the entire application using the following command:docker-compose up
Hope it helps other who are struggling to make this application work.
docker-compose.yml