How to run multiple containers with port expose 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.
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)