Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
852 B · 24 lines
at commit 558fe57f
12345678910111213141516171819202122232425#!/usr/bin/env fish# Helper for Docker-in-Docker with correct volume mounts in dev containers# Usage: docker-dev-mount smartpy-amd64:0.23.1 python3 /workspace/script.py# Get the host path for the workspace set HOST_PATH (docker inspect (cat /etc/hostname) 2>/dev/null | jq -r '.[0].Mounts[] | select(.Destination == "/workspaces/aesthetic-computer") | .Source' 2>/dev/null)if test -z "$HOST_PATH" echo "Error: Could not determine host path for workspace" exit 1end# Get current directory from PWD environment variableset CURRENT_DIR $PWDset CONTAINER_PATH /workspaces/aesthetic-computer# Calculate relative pathset REL_PATH (string replace $CONTAINER_PATH "" $CURRENT_DIR)# Build mount pathset MOUNT_PATH "$HOST_PATH$REL_PATH"echo "✓ Mounting: $MOUNT_PATH -> /workspace"docker run --rm -v "$MOUNT_PATH:/workspace" $argv