Add internet-login

This commit is contained in:
Mo 2022-09-22 01:46:14 +02:00
parent 8f384a93b2
commit 64f548dd3c

27
containers/internet_login.fish Executable file
View file

@ -0,0 +1,27 @@
#!/usr/bin/fish
set -l container_name internet-login
set -l container_volumes_dir ~/volumes/$container_name
buildah rm builder &>/dev/null
buildah from --pull --name builder registry.fedoraproject.org/fedora:latest
buildah run builder -- dnf upgrade -y
buildah run builder -- dnf install -y iputils
buildah run builder -- dnf autoremove -y
buildah run builder -- dnf clean all
if systemctl --user is-enabled container-$container_name
systemctl --user disable --now container-$container_name
end
if podman image exists $container_name
podman rmi $container_name
end
buildah commit --rm builder $container_name
podman-default-create \
$container_name \
-v $container_volumes_dir:/volumes/script:Z,ro \
localhost/$container_name:latest \
/volumes/script/login.sh monitor