1
0
Fork 0

Set default image in `contain` script

main
Ambrose Chua 2021-09-24 14:33:07 +08:00
parent 23096a493e
commit 7b0bf15f71
1 changed files with 6 additions and 3 deletions

View File

@ -60,13 +60,16 @@ _canonicalize_file_path() {
(cd "$dir" 2>/dev/null && printf '%s/%s\n' "$(pwd -P)" "$file")
}
DEFAULT_IMAGE=ghcr.io/serverwentdown/env
DEFAULT_TAG=fedora
CONTAIN_HOME=/home/ambrose
. ~/.config/contain
if [[ -f "$(which docker 2>/dev/null)" ]]; then
runtime=docker
elif [[ -f "$(which podman 2>/dev/null)" ]]; then
if [[ -f "$(which podman 2>/dev/null)" ]]; then
runtime=podman
runtime_extra_opts="$runtime_extra_opts--userns=keep-id "
elif [[ -f "$(which docker 2>/dev/null)" ]]; then
runtime=docker
fi
if $runtime info | grep -iq selinux; then