diff --git a/.gitignore b/.gitignore index 0f96d17..e146bab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -steamcmd-fedora-*.img* *.swp +*.img +*.img.xz diff --git a/build-image-files.sh b/build-image-files.sh index e2f10cc..8e7c16e 100755 --- a/build-image-files.sh +++ b/build-image-files.sh @@ -1,17 +1,14 @@ #!/bin/bash # base vars -NOW=$(date +%s) # epoch timestamp, eg: 1622772927 -BASE_TAG=$(awk '$1 == "FROM" {print $2}' Dockerfile | cut -d\: -f2) # eg: 2.7.1 -BUILD_TAG="fedora-${BASE_TAG}-${NOW}" -IMAGE_FILE="steamcmd-${BUILD_TAG}.img" +IMAGE_FILE="steamcmd-latest.img" -echo "Building image steamcmd:${BUILD_TAG}" -podman build --tag steamcmd:"${BUILD_TAG}" . -podman save localhost/steamcmd:"${BUILD_TAG}" > "${IMAGE_FILE}" +echo "Building image steamcmd:latest" +podman build --no-cache --tag steamcmd:latest . +podman save localhost/steamcmd:latest > "${IMAGE_FILE}" echo "" echo "Wrote ${IMAGE_FILE}, cleaning up" -podman rmi steamcmd:"${BUILD_TAG}" +podman rmi steamcmd:latest echo "" echo "Attempting to compress the image (begin comforting music)" xz --keep --compress -9 --extreme --threads="$(nproc)" "${IMAGE_FILE}"