Docker Commands to get started

Docker pull: Download an image from the docker repository

Docker run: Create a container from the image

Docker start: Start a container that has been stopped

Docker stop: Stop a container that is running

Docker help: Show help for Docker commands

Docker Commands to Manage Containers

Docker ps: Show running containers

Docker ps -a: Show all container

Docker rm: Remove stopped container

Docker Exec: Execute a command in a running container

Docker cp: Copy files to and from a container

Docker Commands to Manage Images

Docker images: Show and work with images

Docker rmi: Remove image

Docker commit: Create an image from a container

Docker Commands to do things

docker run -p 1433:1433 -e SA_PASSWORD=passw0rd -e ACCEPT_EULA=Y
docker exec -it sql_preprod mkdir /var/opt/mssql/backup
docker cp c:\temp\db1.bak sql_preprod:/var/opt/mssql/backup
docker exec -it sql_preprod /bin/bash

Leave a Reply

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

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

Facebook photo

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

Connecting to %s

%d bloggers like this: