zenith/docker_files/updatedockerfiles
Rene Vergara A b675854c49 zenith-install - Docker image generation added to this branch
Scripts to create the installer and the docker image
		 distribution packages included
2024-07-05 20:10:11 -04:00

37 lines
No EOL
1.4 KiB
Bash
Executable file

#!/bin/bash
ZVERSION="0.6.0.0"
echo
echo "Updating docker binary files ...."
echo
echo "... copying zenith to ./bin folder"
cp "../dist-newstyle/build/x86_64-linux/ghc-9.4.8/zenith-0.5.3.0/build/zenith/zenith" "bin/"
echo "... copying assets folder to ./assets folder"
cp -r "../assets/" .
echo "... copying librustzcash_wrapper.so to ./lib folder"
cp "../zcash-haskell/librustzcash-wrapper/target/x86_64-unknown-linux-gnu/debug/librustzcash_wrapper.so" "lib/"
echo
read -r -p "Do you want to create the docker image? [Y/n] " response
case "$response" in
[yY])
if docker image ls | grep -q "zenith-docker" ; then
echo "... removing previous docker image"
docker rmi -f "zenith-docker:"$ZVERSION
fi
echo "... creating zenith-docker:"$ZVERSION" image"
docker build -t "zenith-docker:"$ZVERSION .
echo "... docker image zenith-docker:"$ZVERSION" created."
echo "... exporting zenith-docker:"$ZVERSION" as .tar file"
docker save -o zenith-docker_$ZVERSION.tar zenith-docker:$ZVERSION
echo "... zenith-docker:"$ZVERSION" image ready."
echo "... creating distribution package file "
7z a zenith-docker_$ZVERSION.7z setup zenith-docker_$ZVERSION.tar ./cfg
echo "... distribution file created. (zenith-docker_$ZVERSION.7z)"
;;
*)
echo "... docker image not created."
;;
esac
echo
echo "Done "
echo