cp2k/tools/docker/spack_cache_start.sh
Matthias Krack 107e9aed79 Use podman instead of docker
Rationale for this proposal: Docker is usually not provided on shared compute clusters, e.g. at HPC centres,
because docker runs a daemon with root privileges creating potential security vulnerability. By contrast,
podman is daemonless and more lightweight and is built on the same principles as Docker's API.
2025-05-21 16:25:59 +02:00

27 lines
645 B
Bash
Executable file

#!/bin/bash -e
# author: Ole Schuett
if podman start spack-cache; then
echo "Re-started existing spack cache."
else
# Start MinIO server.
podman run --name spack-cache --detach -p 9000:9000 -p 9001:9001 \
quay.io/minio/minio server /data --console-address ":9001"
sleep 3
podman container logs spack-cache
# Configure localhost.
podman exec spack-cache mc alias set local http://localhost:9000 minioadmin minioadmin
# Create bucket.
podman exec spack-cache mc mb local/spack-cache
# Make bucket public.
podman exec spack-cache mc anonymous set public local/spack-cache
echo "Started new spack cache."
fi
#EOF