Add internet-login
This commit is contained in:
parent
8f384a93b2
commit
64f548dd3c
1 changed files with 27 additions and 0 deletions
27
containers/internet_login.fish
Executable file
27
containers/internet_login.fish
Executable 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
|
Loading…
Reference in a new issue