Add Container file and build script (button_hpr_container.sh) to repo. #263

Open
sgoti wants to merge 4 commits from sgoti/hpr_generator:main into main
Showing only changes of commit 2ca4d32282 - Show all commits

View File

@ -2,7 +2,7 @@
#License: GPL v3
#see <https://www.gnu.org/licenses/>.
#Name: button_podman_make_shownotes.sh
#Name: button_hpr_container.sh
#Purpose: build/run HPR Container.
#Version: beta 0.01
#Author: SGOTI (Some Guy On The Internet)
@ -35,11 +35,11 @@ fi
containerBulidProperties=(
"containerFile" "/path/to/Containerfile"
"hostMountDir01" "path/to/project/directory"
"hostMountDir01" "/path/to/project/directory"
"hostMountDir02" "/tmp/"
"containerMountDir01" "/opt/hpr/"
"containerMountDir02" "/tmp/hpr/"
"containerImageTag" "testing:0.1"
"containerImageTag" "hpr_project:5.40.1"
"pullNewImage" "podman pull docker.io/library/perl"
"recordingDate" "$(${date} -d "${currentYear}/${currentMonth}/01")"
"recordingTimeStart" "15:00" #TZ: UTC
@ -71,13 +71,10 @@ function runHPRContainer () {
--name="hpr_project" \
--user="${unprivilegedUser}" \
${containerBulidProperties[containerImageTag]} bash;
unset currentMonth
unset currentYear
return;
}
function buildNewContainerImage () {
local containerNameAndVersionNumber="hpr_image:5.40.1"
if [[ -f "${containerBulidProperties[containerFile]}" ]]; then
${echo} "Building new container image...\nThis may take several minutes.\
\nThis is a non interactive build process, so you can return when \
@ -131,6 +128,8 @@ unset echo
unset flags
unset podman
unset OPTIND
unset currentMonth
unset currentYear
unset containerBulidProperties
exit 0