1

I have 2 images on my docker toolbox, for jenkins and for artifactory. I can use the command "run" for each to create a running container, jenkins on port 8080 and artifactory on oprt 8081, using the -p flag. When I use the command "docker ps" I can see both containers.

My problem: I can only open one application at a time, for example: Open jenkins on URL 192.168.99.100:8080 (docker toolbox use this IP by default), then, open artifactory on URL 192.168.99.100:8081, the page "jFrog Artifactory is getting ready to work..." will be displayed and then the connection to the artifactory will be lost. But if I stop the jenkins container I could run the artifactory application properly.

I read that docker compose can help to run multiple containers but I didn't understand if it can help my case too.

Any help?

Notes:

  • My "docker ps" output (plus another command for better display)
  • I found out about nginx that can be used as reverse proxy but I managed to set only the Jenkins to work, the artifactory does not work. Seems like I am not configuring the .conf file properly. Is it possible to run artifactory via nginx without configuring SSL? Most of the examples I found had SSL in the .conf file.

enter image description here

3
  • Could you edit your question with the output of your docker ps command? Commented Feb 13, 2019 at 18:21
  • Why not put a third container with a reverse proxy in front of them when everything has to run on the same host / port combination ?
    – Marged
    Commented Feb 14, 2019 at 17:39
  • What does the log of the Artifactory container say before dying? Run it without -d to see directly on the shell.
    – Raphael
    Commented Feb 27, 2019 at 9:13

2 Answers 2

1

My problem was that the docker-machine didn't have enough memory to run both services at the same time.

Using those commands fixed it:

docker-machine stop
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvm default --cpus 2
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvm default --memory 4096
docker-machine start

(The path to the VBoxManage.exe maybe be different for other users and it can be change to just "VBoxManage" if adding it to the environment paths)

0

Most probably the problem with artifactory container is not really related to the ports, check if the docker ps always shows the same container id, if not its probably dying and coming back up, when you start the containers, do you use anything in -v? Have you checked the docker logs of the artifactory container when jenkins is down? Do a docker logs xxxx using the ID of the artifactory container that dies to see what happened.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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