steamcmd-container/build-image-files.sh

18 lines
515 B
Bash
Raw Permalink Normal View History

2021-11-17 00:27:39 +00:00
#!/bin/bash
# base vars
IMAGE_FILE="steamcmd-latest.img"
2021-11-17 00:27:39 +00:00
echo "Building image steamcmd:latest"
podman build --no-cache --tag steamcmd:latest .
podman save localhost/steamcmd:latest > "${IMAGE_FILE}"
2021-11-17 00:27:39 +00:00
echo ""
echo "Wrote ${IMAGE_FILE}, cleaning up"
podman rmi steamcmd:latest
2021-11-17 01:39:21 +00:00
echo ""
2021-11-17 00:27:39 +00:00
echo "Attempting to compress the image (begin comforting music)"
2023-12-16 15:39:26 +00:00
xz --keep --compress -9 --extreme --threads="$(nproc)" "${IMAGE_FILE}"
2021-11-17 00:27:39 +00:00
echo ""
echo "Finished, (non)compressed images created:"
2023-12-16 15:39:26 +00:00
ls --color=auto -lah "${IMAGE_FILE}"*