The blog about containerisation, virtual machines and useful shell snippets and findings

Oneliner for filter docker container by name and start

core@coreos04itpremumlocalbak ~ $ docker ps -a -f name=redmine
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS              PORTS               NAMES
5c4c2c13eb0b        sameersbn/redmine:3.4.2   “/sbin/entrypoint.sh…”   14 months ago       Up 6 days           80/tcp, 443/tcp     redmine_redmine_1
ec9532ae1b24        sameersbn/postgresql      “/sbin/entrypoint.sh”    14 months ago       Up 6 days           5432/tcp            redmine_postgresql_1
core@coreos04itpremumlocalbak ~ $ docker ps -a -f name=redmine -q | xargs docker start
5c4c2c13eb0b
ec9532ae1b24