OILS / deps / podman.sh View on Github | oilshell.org

35 lines, 15 significant
1#!/usr/bin/env bash
2#
3# podman on Debian 12, instead of Docker
4#
5# Usage:
6# deps/podman.sh <function name>
7
8
9write-config() {
10 mkdir -p ~/.config/containers
11 cat > ~/.config/containers/registries.conf <<'EOF'
12unqualified-search-registries = ['docker.io']
13EOF
14}
15
16export-podman() {
17 export DOCKER=podman
18
19 # https://docs.podman.io/en/latest/markdown/podman.1.html
20 export CONTAINERS_REGISTRIES_CONF=~/.config/containers/registries.conf
21
22 # For some reason it uses /run/user/1000/containers by default
23 export REGISTRY_AUTH_FILE=~/.config/containers/auth.json
24}
25
26login() {
27 export-podman
28
29 # type password on stdin
30 sudo -E podman login -u oilshell --password-stdin
31}
32
33if test $(basename $0) = 'podman.sh'; then
34 "$@"
35fi