You can visit Here
UPDATE: go
After cloning the repo:
- In the root directory:
- To build the image from the Dockerfile, run
docker image build --tag <IMAGE-NAME>:<tagname> .
- To run a docker container of the image and to:
- keep STDIN open even if not attached
- provide a tty
- run the container in detached mode
- [UPDATE: After uncommenting line 7 in Dockerfile] publish the exported ports (since it has been provided for in the Dockerfile), run
docker container run -i -t -d -P <IMAGE-NAME>:<tagname>
- To retrieve the ID of the docker container, run
The exposed port can be retrieved from here and the app will be hosted on the mentioned port.
docker container ls
- To get into the container and the filesystem in interactive mode, run
or
docker exec -it <CONTAINER-ID> sh
docker container attach <CONTAINER-ID>
- To stop and remove the container at once, run
docker container rm -f <CONTAINER ID>
- To build the image from the Dockerfile, run
- In the root directory:
- Now, with the
docker-compose.yml
file available can, run [Port to be exposed can be altered in the docker-compose.yml file]docker-compose up -d
- The information can be retrieved by the command
docker-compose ps
- To undo all changes, run
docker-compose down
- Now, with the