When you've a dockerfile, you must build and run it to make use of it.
-
Dockerfile will make sure we build a container, to setup a OS for our application. This is also where we can setup network to our other containers
-
Docker-composer can automate our docker build and boot up our containers. This makes it easy, if we are dependent on other containers and if there are multiple.
docker ps
docker stop $id
docker run $id
docker run -it -p 3000:3000 CONTAINER_ID
docker run -it -p 3000:3000 CONTAINER_ID
docker run -it -p 3000:3000 -v /app/node_modules -v /c/Users/username/frontend:/app -e CHOKIDAR_USEPOLLING=true CONTAINER_ID
docker run -it -p 3000:3000 -v /app/node_modules -v C:\Users\Jacob\GithubProjects\reactContainer\frontend:/app twizzx/reactdevelopment
docker exec -it 2d7bc51163a2 /bin/sh
docker build .
docker build -t twizzx/visits:latest .
docker-compose build
docker-compose up
docker-compose down
docker-compose up --build
docker-compose ps