Docker Commands
On this page
As I dig deeper and deeper into Docker. I'm finding some really useful commands that I have to keep using and reusing. As I use and learn more I will add to this guide.
Docker build command
docker build -t webapp .Docker Tag and Push
docker tag webapp *.azurecr.io/webapp
docker push *.azurecr.io/webappDocker container management
Pull the latest image
docker pull *.azurecr.io/webappRun Container
docker run --name webapp -d -p 8090:80 *.azurecr.io/webappRun a container with a name of webapp, expose port 8090 and route to port 80 on the container.
Running containers
docker psStop container
docker stop a456721Remove container
docker rm a456721This can only be run on stopped containers.