Mercurial > hg > zsh-env
view zshrc-docker @ 187:7d3c872681cb
more braucht jetzt eine Option, damit am Ende "rausgefallen" wird
author | Dirk Olmes <dirk.olmes@codedo.de> |
---|---|
date | Tue, 14 Mar 2023 07:19:11 +0100 |
parents | bb583ebb33e6 |
children |
line wrap: on
line source
# # Useful aliases and functions for docker # alias dim="docker images --format 'table {{.Repository}}\t{{.Tag}}\t{{.ID}}'" alias dims="docker images --format 'table {{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.Size}}'" alias dlf="docker logs -f" alias doc="docker-compose" alias doker=docker alias dpa="docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Status}}\t{{.Names}}'" alias dsh="docker run -it --rm --entrypoint /bin/sh" dex() { docker exec -it $1 /bin/sh } docker_remove_obsolete_images() { docker rmi $(docker images --format 'table {{.Repository}} {{.ID}}' | grep -e '^<none>' | awk '{ print $2 }') } docker_remove_exited_containers() { docker rm $(docker ps -a | grep "Exited" | awk '{print $(NF)}') }