Commands for Docker
Docker commands:
==================
docker images --> See list of Docker images on the system
docker rmi --> Remove image (use -f flag to force)
docker run -it <image> --> Run image in interactive mode
docker inspect <image name> --> see details of an image or container
docker ps --> Show currently running containers
docker ps -a --> List all of the containers on the system
docker top <container ID> --> See top running processes within a container
docker stop <container ID> --> Stop a docker container
docker rm <container ID> --> remove a container
docker stats <container ID> --> Provide statistics of a running container
docker attach <container ID> --> Attach (connect) to a running container
docker pause <container ID> --> Pause processes in a running container
docker unpause <container ID> --> Unpause a paused container
docker kill <container ID> --> Kill a running container
**Containers: Are instances of docker images that can be run using the Docker run command**
Syntax for hitting REST enpoints at a certain point:
e.g. hitting Jenkins image normally running on port 8080
docker run -p 9090:8080 -p 50000:50000 jenkins
**************************
To create an image...
**************************
1. Create a Dockerfile (Need to follow the case sensitivity)
2. Use "docker build" command for the directory in which your Dockerfile exists
e.g.: docker build -t ImageName:TagName dir