re: Learn Docker from the beginning — part III databases and linking VIEW POST

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 failed: port is already allocated.

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

code of conduct - report abuse