File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,24 +8,24 @@ find /nix/store -type d -path '*/bin' | paste -sd: -
88export PATH=" /nix/store:$( find /nix/store -type d -path ' */bin' | paste -sd: -) :$PATH "
99echo " PATH: $PATH "
1010
11- # Start Podman machine if not running
12- if ! podman machine inspect podman-machine-default --format ' {{.State}}' 2> /dev/null | grep -q ' running' ; then
11+ # Check if podman machine exists and is running
12+ if ! podman machine inspect podman-machine-default & > /dev/null; then
13+ echo " Initializing podman machine..."
14+ podman machine init
15+ podman machine start
16+ elif ! podman machine inspect podman-machine-default --format ' {{.State}}' | grep -q ' running' ; then
1317 echo " Starting podman machine..."
1418 podman machine start
1519fi
1620
17- # Wait for podman socket
18- timeout=30
19- elapsed=0
20- while [ ! -S " $DOCKER_HOST " ]; do
21- echo " Waiting for podman socket..."
22- sleep 1
23- elapsed=$(( elapsed + 1 ))
24- if [ " $elapsed " -ge " $timeout " ]; then
25- echo " Timed out waiting for podman socket."
26- exit 1
27- fi
28- done
21+ # Find the actual podman socket location
22+ PODMAN_SOCKET=$( find /tmp/nix-shell.* /podman -name " podman-machine-default-api.sock" -type s 2> /dev/null | head -n 1)
23+ if [ -n " $PODMAN_SOCKET " ]; then
24+ export DOCKER_HOST=" unix://$PODMAN_SOCKET "
25+ echo " Set DOCKER_HOST to Podman socket: $DOCKER_HOST "
26+ else
27+ echo " Warning: Could not find Podman socket"
28+ fi
2929
3030echo " Podman socket ready. Launching application..."
3131exec /app/movement " $@ "
Original file line number Diff line number Diff line change @@ -8,24 +8,24 @@ find /nix/store -type d -path '*/bin' | paste -sd: -
88export PATH=" /nix/store:$( find /nix/store -type d -path ' */bin' | paste -sd: -) :$PATH "
99echo " PATH: $PATH "
1010
11- # Start Podman machine if not running
12- if ! podman machine inspect podman-machine-default --format ' {{.State}}' 2> /dev/null | grep -q ' running' ; then
11+ # Check if podman machine exists and is running
12+ if ! podman machine inspect podman-machine-default & > /dev/null; then
13+ echo " Initializing podman machine..."
14+ podman machine init
15+ podman machine start
16+ elif ! podman machine inspect podman-machine-default --format ' {{.State}}' | grep -q ' running' ; then
1317 echo " Starting podman machine..."
1418 podman machine start
1519fi
1620
17- # Wait for podman socket
18- timeout=30
19- elapsed=0
20- while [ ! -S " $DOCKER_HOST " ]; do
21- echo " Waiting for podman socket..."
22- sleep 1
23- elapsed=$(( elapsed + 1 ))
24- if [ " $elapsed " -ge " $timeout " ]; then
25- echo " Timed out waiting for podman socket."
26- exit 1
27- fi
28- done
21+ # Find the actual podman socket location
22+ PODMAN_SOCKET=$( find /tmp/nix-shell.* /podman -name " podman-machine-default-api.sock" -type s 2> /dev/null | head -n 1)
23+ if [ -n " $PODMAN_SOCKET " ]; then
24+ export DOCKER_HOST=" unix://$PODMAN_SOCKET "
25+ echo " Set DOCKER_HOST to Podman socket: $DOCKER_HOST "
26+ else
27+ echo " Warning: Could not find Podman socket"
28+ fi
2929
3030echo " Podman socket ready. Launching application..."
3131exec /app/mtma " $@ "
You can’t perform that action at this time.
0 commit comments