Skip to content
Snippets Groups Projects
Select Git revision
  • 45848ced51a2015cda951d1331f81e484326adbe
  • main default protected
  • renovate/immich
  • renovate/node-feature-discovery-0.x
  • renovate/gitlab-runner-0.x
  • renovate/docker.io-library-debian-13.x
  • renovate/registry.k8s.io-autoscaling-vpa-updater-1.x
  • renovate/registry.k8s.io-autoscaling-vpa-recommender-1.x
  • renovate/registry.k8s.io-autoscaling-vpa-admission-controller-1.x
  • renovate/cloudflare-5.x
  • renovate/redis-22.x
  • renovate/mariadb-22.x
  • renovate/github.com-prometheus-common-0.x
  • renovate/github.com-prometheus-client_golang-1.x
  • renovate/kubernetes-go
  • renovate/docker.io-bitnami-kubectl-1.x
  • renovate/docker.io-library-nextcloud-31.x
  • renovate/docker.io-bitnamilegacy-kubectl-1.x
  • renovate/docker.io-syncthing-syncthing-2.x
  • renovate/siderolabs-kubelet-1.x
  • renovate/siderolabs-kubelet-1.33.x
  • v25.09
  • v25.08
  • v25.07
  • v25.06
  • v25.05
  • v25.04
  • v25.03
  • v25.02
  • v25.01
  • v24.12
  • v24.11
  • v24.10
  • v24.09
  • v24.08
  • v24.07
  • v24.06
  • v24.05
  • v24.04
  • v24.03
  • v24.02
41 results

koolbox

Blame
  • koolbox 1.16 KiB
    #!/bin/sh
    
    PROGRAM_NAME=koolbox
    CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/$PROGRAM_NAME"
    CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/$PROGRAM_NAME"
    DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/$PROGRAM_NAME"
    
    # Warm up all directories and files mounted to the container
    mkdir -p "$CONFIG_DIR/"{kube,helm,ssh} "$CACHE_DIR/"helm "$DATA_DIR/"helm
    touch "$CONFIG_DIR/env"
    
    # Make sure this script never runs in home, since it would ruin all SELinux labels
    if [ "$(pwd)" = "$HOME" ]; then
      echo "Can not run in home directory, would break SELinux labels." >&2
      exit 1
    fi
    
    # Using systemd-resolved when available
    PODMAN_NETWORK_SETTINGS=""
    if systemctl -q is-active systemd-resolved.service; then
      PODMAN_NETWORK_SETTINGS="--network host --dns 127.0.0.53"
    fi
    
    podman run --rm -it \
        $PODMAN_NETWORK_SETTINGS \
        --env-file="$CONFIG_DIR/env" \
        --hostname koolbox \
        -v "$CONFIG_DIR/kube:/root/.kube:z" \
        -v "$CONFIG_DIR/ssh:/root/.ssh:z" \
        -v "$CONFIG_DIR/helm:/root/.config/helm:z" \
        -v "$CONFIG_DIR/helm:/root/.cache/helm:z" \
        -v "$DATA_DIR/helm:/root/.local/share/helm:z" \
        -v "$(pwd):/workspace:z" -w /workspace \
        quay.io/sheogorath/koolbox:latest $@