DEV Community

Discussion on: Learn Docker - from the beginning, part III databases and linking

Collapse
 
artoodeeto profile image
aRtoo
docker run -d -p 8000:3000 --net isolated_network --name my-container chrisnoring-node
docker run -p 8000:3306 --net isolated_network --name mysql-db -e MYSQL_ROOT_PASSWORD=complexpassword -d mysql

both have the same exposed port. this isn't allowed right? or am i doing it wrong? i have an error

Bind for 0.0.0.0:8000 failed: port is already allocated.
Collapse
 
softchris profile image
Chris Noring

hi. Yes, you are correct. Should 8001 for the database, or at least not 8000. Thanks for noticing :)