git clone https://github.com/subinchaliyath/dockerize_mern.git
cd dockerize_mern
--- docker-compose build
This will build according to the docker-compose.yml file configuration.
--- docker-compose up
This will create 3 containers, for frontend, backend, database.
cd frontend
docker build -t react-app .
react app is a tag name for the image. "." indicate the current directory where we have the Dockerfile.
docker run -d -p:3001:3000 --name react-app-container react-app
-d we can still use the terminal (detached)
-p publishing the port 3001 of host for the 3000 port of container
react-app use this image
docker logs a2sw
a2sw fist digits of container id
``` docker stop a2sw ```
``` docker start a2sw ```
### Remove container then the image
```docker container ps -a```
``` docker container rm -f a3ba ```
a3ba first digits of container ID
For Reference
--------------
[Docker Handbook](https://docker.farhan.info/hello-world-in-docker#container)