Skip to content

Commit

Permalink
Fix above
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Mar 17, 2024
1 parent 0bbf485 commit 474b86c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,6 @@ command = './containers/sandbox.bash'

[tasks.sandbox-cr]
command = './containers/sandbox-with-ghcr.bash'
args = [
'latest',
]
5 changes: 3 additions & 2 deletions containers/sandbox-with-ghcr.bash
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ EOF
sandbox() {
local -r tag="$1"
local -r full_image_id="$(podman pull "ghcr.io/kachick/home:${tag}")"
local -r container_id="$(podman run --detach --rm "ghcr.io/kachick/home:${full_image_id}")"
trap 'podman kill "$container_id"' EXIT ERR
local -r container_id="$(podman run --detach --rm "$full_image_id")"
# shellcheck disable=SC2064
trap "podman kill '$container_id'" EXIT ERR
sleep 1 # Wait for the systemd to be ready
podman exec --user=user --workdir='/home/user' -it "$container_id" '/home/user/.nix-profile/bin/zsh'
}
Expand Down

0 comments on commit 474b86c

Please sign in to comment.