docker-sync icon indicating copy to clipboard operation
docker-sync copied to clipboard

Detect docker host OS

Open dukaev opened this issue 4 years ago • 7 comments

👋 @EugenMayer. Thank you for this app

I have an external machine in the docker-machine. docker-sync works with it only if specify the address:

sync_host_ip = 91.117.201.122

sync_host_ip = 'auto' doesn't work because of my docker host OS is Ubuntu 18.04.4 LTS I have a macOS and docker toolbox installed there.

My PR checks that the OS docker exists. Not only Boot2Docker

I will be glad to answer your questions

dukaev avatar May 09 '20 14:05 dukaev

Did you test this under mac? This detection was pretty hard to nail down in the past

I cannot see how this would not detect a docker-for mac as "system" too

EugenMayer avatar May 12 '20 06:05 EugenMayer

@EugenMayer yes, I did. Do you have a mac? Check these steps:

  1. Add docker external docker (from http://hetzner.com/ for example) to your docker-machine
docker-machine create \
    --driver generic \
    --generic-ip-address=$IP_ADDRESS \
    --generic-ssh-user $USERNAME \
    --generic-ssh-key ~/.ssh/$PRIVATE_KEY \
    default

  1. Set it by default (add to .bashrc)
eval $(docker-machine env default)
  1. Use sync_host_ip by default value (empty or auto)

dukaev avatar May 12 '20 06:05 dukaev

image

dukaev avatar May 12 '20 06:05 dukaev

Apprently currently i do no longer run macOS for development, using appveyor for macOS based tests will be one of my goals for docker-sync.

I understood your point, the question is, what does a d4m installation return in Operating System - i suspect it also would return somewhat an alpine linux flavor.

Why this is important is

  • with your patch, .docker_toolbox? would return true inside a docker-4-mac installation
  • without your patch i wont

This is a IMHO - it is what i remember, i cannot test this right now

EugenMayer avatar May 12 '20 07:05 EugenMayer

@EugenMayer how can I help fix this?

dukaev avatar May 12 '20 08:05 dukaev

Hello @dukaev any way we can move this forward?

EugenMayer avatar Jul 09 '20 18:07 EugenMayer

Hello @EugenMayer. Do you have any ideas?

dukaev avatar Jul 10 '20 09:07 dukaev