# docker command to pull the latest redis image and run on the given port (i.e. 6379).

docker run --name my-redis-container -p 6379:6379 -d redis

# docker command to check if the container is started successfully or not.
docker ps -a

# docker command to stop the running container
Syntax: docker stop <container_name>

-- docker stop my-redis-container

# docker command to delete the running container
Syntax: docker rm <container_name>

-- docker rm my-redis-container

# docker command to delete the downloaded image post work
Syntax: docker rmi <image_name>

-- docker rmi redis