mirror of
https://github.com/GNS3/gns3-registry.git
synced 2025-03-23 20:45:18 +00:00
kalilinux - rebuild when image version changes
This commit is contained in:
parent
eeaf9106fb
commit
128b642464
16
.github/workflows/build-docker-images.yml
vendored
16
.github/workflows/build-docker-images.yml
vendored
@ -93,5 +93,21 @@ jobs:
|
||||
set -f
|
||||
set -- $IMAGES
|
||||
set +f
|
||||
|
||||
# get image version
|
||||
get_image_version() {
|
||||
docker buildx imagetools inspect --format '{{json .Image}}' "$1" | \
|
||||
sed -n 's/^ *"org\.opencontainers\.image\.version": *"\([^"]*\).*/\1/p' | \
|
||||
head -n 1
|
||||
}
|
||||
|
||||
# special treatment for kalilinux: rebuild when image version changes
|
||||
if [ "$GITHUB_EVENT_NAME" = "schedule" ]; then
|
||||
basever=$(get_image_version kalilinux/kali-last-release:amd64)
|
||||
imagever=$(get_image_version gns3/kalilinux)
|
||||
[ -z "$basever" ] || [ "$basever" = "$imagever" ] || \
|
||||
set -- "$@" kalilinux
|
||||
fi
|
||||
|
||||
# use option --dir to use a subdirectory as a docker base dir
|
||||
python3 "$GITHUB_WORKSPACE/.github/bin/docker_build" --dir "docker" "$@"
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM kalilinux/kali-rolling
|
||||
FROM kalilinux/kali-last-release
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y tshark && apt-get install -y --no-install-recommends metasploit-framework nmap hydra sqlmap telnet openssh-client dnsutils yersinia ettercap-text-only cisco-global-exploiter cisco-auditing-tool snmp dsniff dnschef fping hping3 python3-scapy\
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user