#!/bin/bash
IMAGE=$1
SERVER=$2
# toto
if [[ -z $1 ]];then
echo "#
# usage
#
build the image podman and upload to the /root of VM:
build-podman <image-name> <rootr@server>
build-podman mariadb:latest <root@server>
once scp to the /root of the remote server use :
podman load -i image_tag.tar
list all images available to scp
build-podman ls"
exit 0
fi
if [[ $1 == 'ls' ]];then
podman images
exit 0
fi
if [[ -z $2 ]]; then
echo "We have not the user@domain.com"
exit 0
fi
if [[ -f 'build-images.sh' ]];then
bash +x build-images.sh
file=${1//:/_}
podman save $1 > $file.tar
scp $file.tar $2:/root
else
echo "We have not found build-images.sh script"
exit 0
fi
hello @stephdl i think there is a slight Language barrier. i have read and re-read this post 5 times, each time i understand something different. could you kindly provide more context, or edit the descriptions with more details…
am sorry, am abit lost.
build-images.sh is a script in the module project to build the images of the containers, but once built the images are local in your dev computer, you must push them to your test server.
Either by pushing them to ghcr.io manually and by downloading them from the test server
Or by pushing the image by ssh to the test server (it is what the script does)
There is another way that I do not use, it is to build and develop directly on the test server, in that case the images to install will be also local.