Skip to content

jleskovar/docker-functions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 

Repository files navigation

Docker

Fork of tcnksm/docker-alias, modulo zsh support (although it may work out of the box)

Pre-requisites

Make sure the official Docker bash completions are installed

Install

$ curl -fsSL https://raw.github.com/jleskovar/docker-alias/master/docker_functions >> ~/.bashrc && source ~/.bashrc

Commands

# Get latest container ID
dl

# Get container process
dps

# Get process included stop container
dpa

# Get images
di

# Get container IP
dip

# Run deamonized container, e.g., $dkd base /bin/echo hello
dkd

# Run interactive container, e.g., $dki base /bin/bash
dki

# Stop all containers
dstop

# Remove all containers
drm

# Stop and Remove all containers
dsr

# Remove all images
dri

# Dockerfile build, e.g., $dbu tcnksm/test 
dbu

# Run bash for any image
dbash

# Enter docker container
dent

# Find out container PID
dpid

# Get stats for a container
ds

# Remove all untagged images
dgc

# Kill container
dkill { docker kill $1; }

Reference

About

Handy Docker functions with tab completion

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors