Skip to content

Instantly share code, notes, and snippets.

View Chuxel's full-sized avatar
🏗️
Focusing

Chuck Lantz Chuxel

🏗️
Focusing
  • GitHub Staff
  • Minneapolis, MN
  • X @chuxel
View GitHub Profile
@Chuxel
Chuxel / fix-bind-mount.sh
Last active October 14, 2020 17:32
Script to ensure using "docker -v" from the workspace folder functions in Codespaces
#!/bin/bash
if [ "${CODESPACES}" != "true" ]; then
echo 'Not in a codespace. Aborting.'
exit 0
fi
WORKSPACE_PATH_IN_CONTAINER=${1:-"$HOME/workspace"}
WORKSPACE_PATH_ON_HOST=${1:-"/var/lib/docker/vsonlinemount/workspace"}
VM_CONTAINER_WORKSPACE_PATH=/vm-host/$WORKSPACE_PATH_IN_CONTAINER
VM_CONTAINER_WORKSPACE_BASE_FOLDER=$(dirname $VM_CONTAINER_WORKSPACE_PATH)