Build an image with a dockerfile:
docker build - < Dockerfile
Add a name to the image (after building it):
docker tag <image ID> <image name>:latest
e.g. docker tag dbfee88ee9fd windowsservercore:latest
(Source)
Mount an external path:
docker run -it -v <host path>:<guest or image/container path> <container id> /bin/bash
Run bash to explore an image (use exec if the container is running):
docker run -it <container id> /bin/bash
Enabling gdb within a docker container:
docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
(Source)