Skip to content

Instantly share code, notes, and snippets.

@marijus-ravickas
Last active January 3, 2020 13:00
Show Gist options
  • Save marijus-ravickas/892468ce8a5225e5bb352eedc0d3c198 to your computer and use it in GitHub Desktop.
Save marijus-ravickas/892468ce8a5225e5bb352eedc0d3c198 to your computer and use it in GitHub Desktop.

removing images

docker image rm $(docker images | grep with-db-certs | awk '{ print $1":"$2}')

removing untaged images

docker images | egrep '<none>' | awk '{print $3}' | xargs -I {} docker image rm {}

removing all containers

docker rm $(docker ps -a | grep -v "CONTAINER" | awk '{ print $1}')

running dgoss on specific images from local repo

docker images | sort | grep with-db-certs | grep -v deps | awk '{print $1":"$2}' | xargs -I'{}' dgoss run {} sleep 10

folders by file name

ls | xargs -n 1 | cut -d '.' -f 1 | xargs -I {} mkdir ../projektu_medziaga/{}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment