Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
add podman-host
Browse files Browse the repository at this point in the history
  • Loading branch information
vfosnar committed Nov 12, 2023
1 parent 7a70921 commit 99a2bf6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions config/files/usr/bin/podman-host
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -x

# This little workaround is used to ensure
# we use our $USER inside the containers, without
# resorting to creating devcontainer.json or similar stuff
arr=("$@")
for i in "${!arr[@]}"; do
if [[ ${arr[$i]} == *"root:root"* ]]; then
arr[$i]="$(echo "${arr[$i]}" | sed "s|root:root|$USER:$USER|g")"
fi
done

flatpak-spawn --host podman "${arr[@]}"

0 comments on commit 99a2bf6

Please sign in to comment.