Skip to content

Instantly share code, notes, and snippets.

View SQiShER's full-sized avatar
👨‍👩‍👧
Work, Family, Sleep, Repeat

Daniel Bechler SQiShER

👨‍👩‍👧
Work, Family, Sleep, Repeat
View GitHub Profile
@SQiShER
SQiShER / README.md
Created December 17, 2015 16:13
Delete unused Docker images

In theory it shouldn't be a problem to run docker rmi on images that are currently in use, as Docker will simply skip them.

In practice this doesn't seem to be bulletproof. On more than one occasion this caused weird problems, so I prefer to only run rmi for images that I know, are not in use.

Here's the command I use to do so:

docker rmi $(docker inspect -f '{{.Image}}' `docker ps -a -q --no-trunc` | grep -v -f - <(docker images -q --no-trunc))
@SQiShER
SQiShER / metrics.diff
Last active July 13, 2021 19:17
HAProxy Exporter vs. Built-in Metrics
go_gc_duration_seconds | haproxy_backend_active_servers
go_gc_duration_seconds_count | haproxy_backend_backup_servers
go_gc_duration_seconds_sum <
go_goroutines <
go_info <
go_memstats_alloc_bytes <
go_memstats_alloc_bytes_total <
go_memstats_buck_hash_sys_bytes <
go_memstats_frees_total <
go_memstats_gc_cpu_fraction <