Closed rjfarmer closed 5 years ago
I've run into something similar once or twice in the past. I've resolved it by helping the user through the steps to completely delete the machine and start over. I've even considered including a script for that purpose (example pasted below).
The logic you describe sounds tricky to implement. Do you think we could get away with just making this script available and encouraging users to try that?
`#!/bin/bash
OPTIND=1 # Reset in case getopts has been used previously in the shell.
install_drive=C
while getopts "d:" opt; do case "$opt" in d) install_drive=$OPTARG ;; esac done shift $((OPTIND-1)) # In case I add other stuff later...
export MACHINE_STORAGE_PATH=${install_drive}:\docker echo $MACHINE_STORAGE_PATH
docker-machine ls docker-machine rm mesa-machine`
Ugh. I couldn't get the code to paste right. Let me know if you need me to send the file so that it's more readable.
I think that script would be useful in general as a uninstall.sh file so people can clean up afterwards. But I'm going to give vbox a try to see if we can check if the folder is mounted, it should be as simple as:
if [ ! check_docker_work_is_mounted ] then
mount_docker_work
fi
Ok, go for it.
I added the uninstall script in case we ever want to refer to it while helping users.
Should now be fixed in de8e315
Had a user who had issues getting this setup with the windows home. It had gone through the docker-machine create step but had failed when mounting the docker_work folder. However next time they logged in, $MACHINE_EXISTS -eq 1 so we skip the step setting up the docker_work folder. So docker_work never gets mounted into the docker container.
So we need to add some logic to check if docker_work is already mounted, and if not mounted it, outside the MACHINE_EXISTS check. It looks like vbox will throw an error (but keeps working) if we try to mount a folder that already exists. So there might be someway to use VBOX to check if the folder is already mounted