I'm trying to switch from Vagrant to Docker (too late to go back now).
I've deleted my Oracle Vbox already, and I have:
- Installed Docker for Mac
- Pulled sath89/oracle-12c
- Followed instructions on https://hub.docker.com/r/sath89/oracle-12c/
So I created the Docker container using this command :
docker run -d -p 8080:8080 -p 1521:1521 sath89/oracle-12c
Then I tried to setup users/permission etc using localhost:8080/em
which was unreachable.
Then I opened Kinematic to see if I could find my container IP and I found there that my Docker container IP is 192.x.x.x
I was able to login into 192.x.x.x:8080/em and setup what I needed to setup.
And my app is connecting to the Docker when I specify the docker ip: 192.x.x.x
But it should be really connecting via localhost, why is the localhost:8080/em not working and why is the app not able to connect to Docker container via localhost?
It's working for all my other team-mates, I'm using mac OS Sierra.
Short answer:
Despite what I said in my comment, it turns out you didn't wait long enough before trying to connect to the container. Display the logs to see when init is done, then try again.
Long answer:
I got it working this way. First, I started the container (I only added the --name for simplicity sake):
Then I tried to connect to the container, doing a simple:
That didn't work, so I displayed the container's logs:
It showed me that the container needed time to start up, with the following logs:
It took me about 15min to init the db. Then it was working