Docker Documentation
Use this page to:
- pull the docker image of the nifty-dogs-api and use the image locally
1. Pull the image from docker repo:
From Terminal / CLI:
docker pull adevlinb/lofty
2. Run the image in a container:
From Terminal / CLI
docker run --name lofty-backend -p 8000:8000 adevlinb/lofty
3. Browse to localhost:8000
... just go to localhost:8000 in your browser and an intro page should pop up...
Extra Commands you may want to know:
From Terminal / CLI
docker run --name lofty-backend -p 8000:8000 -d adevlinb/lofty
The "-d" command will run the container "detached" which will allow you to run commands in the same terminal while the container is in use.
From Terminal / CLI
docker stop lofty-backend
This command will stop the running container.
From Terminal / CLI
docker start lofty-backend
This command will show all running containers
From Terminal / CLI
docker ps
This command will show all running containers
From Terminal / CLI
docker rm lofty-backend
This command will remove the container (based on container name - if the container is not running)
Will warn cannot remove a running container
From Terminal / CLI
docker container prune
This command will remove all stopped containers
Will warn / ask if you want to follow through with this command
From Terminal / CLI
docker images
Will show all images in your local repo
From Terminal / CLI
docker rmi lofty-backend
This command will remove the specific image
This command will remove based on image id or name