CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ca030d3cf1c2 konakart_app "/bin/sh -c '/bin/bas" 16 minutes ago Exited (1) 5 minutes ago konakart_app
08909245064b beantoast/dtkonakart_mysql "/entrypoint.sh mysql" 54 minutes ago Up 54 minutes 0.0.0.0:3300->3306/tcp konakart_db
I'm trying to run konakart app and it's database in two different containers. The database seems to be working fine, but the application itself seems to have no IP.
When I type in docker inspect ca03
I get the following:
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
Any idea of how to assign a my IP address, port 8080 to the konakart_app?
The reason is simple based on the output of docker ps -a
result that you posted in the top.
You might have noticed that it is showing status Exited (1) 5 minutes ago
for the container whose id is ca030d3cf1c2
. That means, container is stopped.
Once container is stopped, it will not have any IPAddress
. That's the reason being shown empty
in the result of docker inspect ca03
which you posted.
Start the container, you would get the IPAddress
.
To your last question, you may have that configuration for port forwarding using your docker-compose.yml
file. Or you may also do it while running docker run
using -p <hostport>:<container port>
option.
Hope this is helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With