Useful Docker Commands

Hey everyone,

This is more for personal reference, but hopefully it’s able to help someone else as well. This post will simply be used for a list of docker commands that I’ve found handy and may need to use again down the track.

CommandDescriptionReferenceMisc
docker build -t “twitch/warehouse” -f .\Dockerfile-warehouse .Build and tag an imageUsed while following this tutorial: https://github.com/MassTransit/Sample-Twitch
docker psList all running containers
docker exec -it <container_id> shAccess terminal of running containerhttps://stackoverflow.com/a/30173220/522859
docker stop <container_id>Stop a running containerCan then start it again using docker start <container_name>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s