@enesusta/dcli

CLI for Docker


Keywords
docker, cli
License
ISC
Install
npm install @enesusta/dcli@1.0.6

Documentation

dcli

CodeFactor npm JavaScript Style Guide install size

dcli is cli for Docker.

Installation

npm i @enesusta/dcli -g

Note:

Make sure that variables like grep, docker, sh are defined on your $PATH variable.

Otherwise it may not work.

Commands

default

default command has three options.

Command Description
-c List only containers and prints information of each container
-ci Prints only container IDs and names
-c

Lists only containers

dcli -c
-i

Lists only images

dcli -i
-v

Lists only volumes

dcli -v

start

Starts a container that you already have. start command has 1 option.

dcli start

start all

Starts whole containers that you already have.

dcli start --all

stop

Stops a container that you already have.

dcli stop

stop all

Stops whole containers that you already have.

dcli stop --all

rm

Removes a container that you already have. rm command has 1 option

dcli rm

rm force

Removes a contaniner that is running

dcli rm -f

or

dcli rm --force

rmi

Removes a image that you already have.

dcli rmi

rmi -f

inspect

Inspects a container that you already have.

inspect command has 1 option.

dcli inspect

inspect only IPAddress

This option uses grep via unix pipes.

dcli inspect -h

-h means host.

dump

dcli can even dump your database containers.

  • For postgre containers;
dcli dump --postgre

  • For mysql containers;
dcli dump --mysql