Open ComaVN opened 8 years ago
Hm, that's a tricky one. By installing as admin
, certain files are being installed for the admin
user, and therefore, the roel
account won't be able to access them. You can try to track each one down and fix it, but I'm not sure how easy it is. As a first step, run echo $DOCKER_CERT_PATH
and see if you have read permissions to that file, as I believe that's what's used to SSH to the boot2docker VM.
I worked around it by running docker-osx-dev install
as admin
to install the dependencies, then commenting out line 1097 in the install function (install_dependencies
), and then running docker-osx-dev install
again as roel
(plus some virtualbox housekeeping to delete the boot2docker-vm
running under the admin
user):
roel% su admin
admin% docker-osx-dev install
admin% VBoxManage controlvm boot2docker-vm poweroff
admin% VBoxManage unregistervm --delete boot2docker-vm
admin% nano /usr/local/bin/docker-osx-vm
comment out line 1097 in /usr/local/bin/docker-osx-vm
:
function install {
log_info "Starting install of docker-osx-dev"
# XXX install_dependencies
init_docker_host
install_rsync_on_docker_host
add_docker_host
add_environment_variables
print_next_steps
}
admin% exit
roel% docker-osx-dev install
After that, it works ok, and boot2docker-vm
runs as roel
I could try to find some time to make a PR to make the install_dependencies optional, with a --skip-dependencies
. Would that be something you'd consider pulling? Alternatively, there could be an init
command that does the same, eg.
function init {
log_info "Initializing docker-osx-dev"
init_docker_host
install_rsync_on_docker_host
add_docker_host
add_environment_variables
print_next_steps
}
Nice. A --skip-dependencies
flag sounds like a great idea!
I run homebrew and
docker-osx-dev install
asadmin
(privileged user), and do my development asroel
(an unprivileged user, who isn't member of the admin group)If I run
docker-osx-dev
asadmin
, it works, and it starts rsyncing.However if I run
docker-osx-dev
asroel
, it asks for adocker@localhost
's password:I have no idea what this password would be. I presume this is somehow caused by the installation linking
admin
's ssh key to the vm's authorized_keys?I cannot do
docker-osx-dev install
as roel:I don't want my regular user to be able to write to /usr/local for security reasons.
Am I doing something wrong here? should I run
docker-osx-dev
asadmin
? This feels wrong, since the directory I want to rsync lives inroel
's home dir.