Skip to content

Instantly share code, notes, and snippets.

Linux:
```
docker run -it --rm alpine /sbin/ip route|awk '/default/ { print $3 }'
```
Windows:
```
docker run -it --rm alpine nslookup host.docker.internal
```
@mtracz
mtracz / gist:f4eda4131ca38bb88aed400e35ed2d47
Created July 22, 2021 11:20
bash: explode string into array by delimiter
#!/bin/bash
VERSION=1.2.3.4
oldIFS=$IFS
# delimiter
IFS="."
#Read the split words into an array based on delimiter
@mtracz
mtracz / PHP.ini development vs production
Last active February 15, 2023 14:55
PHP.ini development vs production DIFF [8.2.2]
https://www.diffchecker.com/i1c5ZNyo/
PHP 8.2.2
@mtracz
mtracz / gist:38a4e5c69be9d48c7709ee67d189fd5d
Created March 14, 2023 10:55
Comparing 2 containers filesystem
https://github.com/GoogleContainerTools/container-diff
container-diff analyze <image-name> --type file > first.txt
container-diff analyze <image-name> --type file > second.txt
diff --side-by-side first.txt second.txt
@mtracz
mtracz / List docker volumes by size
Last active July 10, 2024 07:22
List docker volumes by size
sudo du -aBm -d 1 /var/lib/docker/volumes 2>/dev/null | sort -nr | head -n 15
docker system df -v