Docker

[cli]
Detach running docker instance
Ctrl+p+q

[docker run]
Run bash in a CentOS container
$ docker run -i -t --rm centos bash

Run terraform from a container and local workspace
$ docker run -i -t hashicorp/terraform:latest plan

Run override ENTRYPOINT
$ docker run --entrypoint /bin/sh --rm -it ghcr.io/coder/coder:latest

Run with mapped local directory  using host network
$ docker run -d --name="home-assistant" -v /home/pi/homeassistant:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/raspberrypi3-homeassistant

Run gtop
$ docker run --rm -it --name gtop --net="host" --pid="host" aksakalli/gtop

[docker exec]
Run sh in running container
$ docker container exec -it CONTAINER_NAME /bin/sh -c 'uptime'

[references]
* https://docs.docker.com/engine/reference/commandline/
* https://github.com/BlueCentre/container-workspace