Docker Commands

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/webapp

Docker container management

Pull the latest image

docker pull *.azurecr.io/webapp

Run Container

docker run --name webapp -d -p 8090:80 *.azurecr.io/webapp

Run a container with a name of webapp, expose port 8090 and route to port 80 on the container.

Running containers

docker ps

Stop container

docker stop a456721

Remove container

docker rm a456721

This can only be run on stopped containers.


CloudStatus

We have been using cloud services to build products and web sites getting alerts has helped us stay ahead of issues that might happen. We track over 300 sources of information for Microsoft Windows Azure, Google Cloud, Amazon Web Services, MailGun, Github, bitbucket and more.

Try Cloudstatus
comments powered by Disqus