Skip to content

Instantly share code, notes, and snippets.

@tgagor
tgagor / how-old-docker-official-images-are.sh
Last active March 24, 2024 20:35
How old official Docker images are?
#!/bin/bash
CURRENT_TIMESTAMP=$(date +%s)
echo "Image | Creation date | Age (in days) | Packages to upgrade"
echo "---|---|---|---"
for i in centos:7 quay.io/centos/centos:centos7 quay.io/centos/centos:stream8 quay.io/centos/centos:stream9 \
debian:10 debian:11 debian:12 \
ubuntu:18.04 ubuntu:20.04 ubuntu:22.04 ubuntu:24.04 \
@tgagor
tgagor / purge_nexus_v3_releases.groovy
Created September 22, 2017 13:54
Script that can be used to purge nexus v3 releases
import org.sonatype.nexus.repository.storage.StorageFacet;
import org.sonatype.nexus.repository.storage.Query;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
def fmt = DateTimeFormat.forPattern('yyyy-MM-dd HH:mm:ss');
[
'maven-releases',
'other-releases'
].each { reponame ->