➣ Reading Time: 2 minutes
#!/bin/bash

TODAY=20210928

function package_container(){
    DOCKERNAME=1
    DOCKERID=2

    echo "[in function package_container] DOCKERNAME=DOCKERNAME"
    echo "[in function package_container] DOCKERID=DOCKERID"
    echo "[in function package_container] TODAY=TODAY"

    echo "Start commitDOCKERNAME-TODAY"
    docker commit -a="Howard" -m "DOCKERNAME-TODAY"DOCKERID DOCKERNAME-TODAY
    echo "Start making DOCKERNAME-TODAY.tar"
    docker save -o DOCKERNAME-TODAY.tar DOCKERNAME-TODAY
}


package_container "container_name" "id"