How_To_Linux_Solutions/day_4/compile_tmate_container.sh

22 lines
547 B
Bash
Raw Normal View History

2022-08-29 20:35:42 +00:00
#!/usr/bin/env bash
# Check if script exists that will run in the container
if [ ! -f scripts/compile_tmate.sh ]
then
echo "Script scripts/compile_tmate.sh not found!"
exit 1
fi
# Make sure that the script is executable
chmod u+x scripts/compile_tmate.sh
# Make sure that the "output directory" exists
mkdir -p bin
# Run container
podman run -it --rm --tz local -v ./scripts:/volumes/scripts:Z,ro -v ./bin:/volumes/bin:Z ubuntu:latest /volumes/scripts/compile_tmate.sh
echo "DONE!"
echo "The output binary can be found at bin/tmate"