File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Build: docker build -f node.dockerfile -t danwahlin/node .
1+ # Build: docker build -f node.dockerfile -t danwahlin/nodeapp .
22
33# Option 1: Create a custom bridge network and add containers into it
44
55# docker network create --driver bridge isolated_network
66# docker run -d --net=isolated_network --name mongodb mongo
7- # docker run -d --net=isolated_network --name nodeapp -p 3000:3000 danwahlin/node
7+ # docker run -d --net=isolated_network --name nodeapp -p 3000:3000 danwahlin/nodeapp
88
99# Seed the database with sample database
1010# Run: docker exec nodeapp node dbSeeder.js
1111
12- # Option 2 (Legacy Linking)
12+ # Option 2 (Legacy Linking - this is the OLD way )
1313# Start MongoDB and Node (link Node to MongoDB container with legacy linking)
1414
1515# docker run -d --name my-mongodb mongo
16- # docker run -d -p 3000:3000 --link my-mongodb:mongodb --name nodeapp danwahlin/node
16+ # docker run -d -p 3000:3000 --link my-mongodb:mongodb --name nodeapp danwahlin/nodeapp
1717
1818FROM node:alpine
1919
You can’t perform that action at this time.
0 commit comments