Created
February 1, 2019 05:47
-
-
Save lucaswilric/0a5ed138accb872be91e3ad2c04be2ab to your computer and use it in GitHub Desktop.
apt-diff - Diff the installed apt packages between two versions of a Docker image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
repo=$1 | |
tag1=$2 | |
tag2=$3 | |
get_pkgs () { | |
img=$1 | |
file=$2 | |
docker pull ${img} > /dev/null | |
docker run --rm ${img} dpkg --list > ${file} | |
} | |
pkgs1=$(mktemp) | |
pkgs2=$(mktemp) | |
get_pkgs $repo:$tag1 $pkgs1 | |
get_pkgs $repo:$tag2 $pkgs2 | |
diff ${pkgs1} ${pkgs2} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment