Skip to content
alex [dot] kramer [at] g_m_a_i_l [dot] com edited this page Jun 26, 2018 · 15 revisions

Docker

Containers

List all containers:

docker ps -a

List running containers by name or id:

docker ps --format "{{.Names}}" # name
docker ps -q # id

Delete:

docker rm [CONTAINER NAME/ID]

Images

List:

docker images

Inspect:

docker inspect [IMAGE NAME]

History:


Build, skip cache, with name and tag:
```bash
docker build --no-cache -t [NAME]:[TAG] [PATH TO DOCKERFILE]

Run image

Backgrounded with mapped port (necessary for OSX)

docker run -d -p [HOST PORT]:[CONTAINER PORT] [IMAGE NAME]

Clone this wiki locally