Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 13 11:37
    torson commented #687
  • Aug 13 10:58
    torson commented #687
  • Aug 02 14:29
    niick7 commented #809
  • Aug 02 14:29
    niick7 closed #809
  • Jul 29 16:25
    Carolis commented #809
  • Jul 27 23:09
    niick7 edited #809
  • Jul 27 23:08
    niick7 opened #809
  • Jul 21 23:37
    dependabot[bot] labeled #808
  • Jul 21 23:37
    dependabot[bot] opened #808
  • Jul 21 23:37

    dependabot[bot] on bundler

    Bump tzinfo from 1.2.9 to 1.2.1… (compare)

  • Jul 21 14:35
    EugenMayer commented #804
  • Jul 21 13:43
    NikitaKharkov commented #804
  • Jul 19 15:26
    jlurena commented #498
  • Jul 11 21:15
  • Jul 11 15:31
    ardabeyazoglu commented #806
  • Jul 11 14:55
    jlurena commented #806
  • Jul 11 14:54
    jlurena commented #806
  • Jul 08 15:49
    jlurena opened #807
  • Jul 04 11:24
    NikitaKharkov commented #804
  • Jul 02 21:22
    ardabeyazoglu opened #806
Eugen Mayer
@EugenMayer
(including AFPS)
thats the main reason docker-sync nowdays has native_osx as default
Joshua Sierles
@jsierles
OK, I just switched to rsync because of the file watch bugs
Eugen Mayer
@EugenMayer
which will not help you.
Joshua Sierles
@jsierles
? I read an issue that suggested it would help.
" yes, rsync is not affected by this, thats why having multiple strategies is one of our goals - pick the axe for your case."
Eugen Mayer
@EugenMayer
i do not recommened anything else then default
anything else you can readup in the threads, case by case, make your own decision
Joshua Sierles
@jsierles
OK. Well we have been seeing problems with host->app syncing stopping working. We don't need the other way, so we switched.
Eugen Mayer
@EugenMayer
you run from one issue to the other - and native_osx has the best tradeoffs
Joshua Sierles
@jsierles
Well having to stop and start the daemon is not ideal
Eugen Mayer
@EugenMayer
d4m combines all weaknesses of OSX into one big pile of ... so if you expect to get something bulletproof - i guess that wont happen. I would love to have such a thing
Joshua Sierles
@jsierles
I don't expect we will have CPU issues since we only sync one or two files at a time.
Eugen Mayer
@EugenMayer
not ideal is using OSX ofor development.
if you use docker
Joshua Sierles
@jsierles
Yes, I would prefer not to use docker or OSX, but that's life :)
Eugen Mayer
@EugenMayer
so you rather go with the pragmatic things if you want to use docker+osx
Joshua Sierles
@jsierles
Anyway, let's see how rsync works out
Eugen Mayer
@EugenMayer
go for it
Mathias Larsen
@tripox
@EugenMayer, are you planning for a beta with EugenMayer/docker-sync#521 ?
Y. Mayer
@whythecode
hey guys, just a short FYI - my team has had docker fsevents issues (NOT docker-sync related as we're only starting to use it now) for quite a few months now, and the way we use to make it work again is stopping, removing and restarting the container. no need to restart d4m or mac itself. maybe this helps someone in debugging.
Eugen Mayer
@EugenMayer
@tripox sorry it took me ages - really sorry. Release 0.5.3 just right now
Yo_IT
@yo-it-engineer
@EugenMayer Thanks for the update! Are there any way to update if I accidentally said 'no' to docker-sync when it asked me want to update to 0.5.3?
Eugen Mayer
@EugenMayer
@yo-it-engineer you can just wait, it will ask again, remove ~/.docker-sync-global.yml or run gem update dwm
Yo_IT
@yo-it-engineer
@EugenMayer remove ~/.docker-sync-global.ym worked. thanks!
Mathias Larsen
@tripox
Awesome, @EugenMayer! No worries! :)
Ben Creasy
@jcrben

Optionally, if you do not want to use unison or want a better rsync or use unison (than the built-in OS X one)

from https://github.com/EugenMayer/docker-sync/wiki/docker-sync-on-OSX#advanced--optional

I don't get this - does native-osx use unison by default or not? I don't think unison is built into mac, but rsync is?

Donny Kurnia
@donnykurnia

@jcrben native-osx using unison, but the unison is executed inside the virtual machine (that run in the xhyve). It will sync between the project folder (that mounted using docker osxfx) with the internal volume. The other container will use this internal volume, instead of the mounted osxfs.

If you choose unison, then the unison will need to be run in macos instead. You can install it using homebrew. there is no need to mount the host folder into the vm, because unison program will send the changes into the docker-sync container

Ben Creasy
@jcrben
ah ok. so this allows me to avoid mounting a docker volume to sync to the host altogether?
still a bit confused about the whole problem. let's say I'm not using docker volumes to begin with - I'm sshing into my containers and doing all my work inside them. do you expect performance issues in that case? does docker-sync help?
Donny Kurnia
@donnykurnia
@jcrben to know if docker-sync will help your case or not, it's depend on how you are using docker in the first place
there are 2 options using docker in mac. docker-machine (by using virtualbox or other vm machine), and docker for mac.
virtualbox provide vboxsf to mount host folder into vm.
docker4mac provide osxfs to do the same
if you have use it, then you will know or encounter the limitation of this approach
docker-sync come as a way to circumvent these limitation. By using unison or rsync to do the synchronization between 2 folders, the container now run full speed because it's using folder inside vm. But we also get the synced folder in the mac, and we can still edit it using text editor from mac
Donny Kurnia
@donnykurnia
if you are ssh-ing into your container in the first place, then you should not ever need to use docker-sync in the first place, because you will not need to have the same file also available in the mac, right?
Ben Creasy
@jcrben
yep. I was just trying to dig a bit deeper into whether there are performance issues with containers which don't do volume mounts. anyhow, I'm still a bit fuzzy on how to get this working, but I think I'm OK to keep messing around for now
Ben Creasy
@jcrben
I wonder why my app_sync directory would be empty while my host_sync is full
also the ultimate destination directory on my app container is empty
Ben Creasy
@jcrben
version: "2"

options:
  verbose: true
syncs:
  appcode-native-osx-sync: # tip: add -sync and you keep consistent names as a convention
    src: '.'
    # sync_strategy: 'native_osx' # not needed, this is the default now
    sync_excludes: []
just a very simple strategy - in my docker-compose.yml I've got:
    volumes:
      - appcode-native-osx-sync:/website/main:nocopy
...
  appcode-native-osx-sync:
    external: true
Ben Creasy
@jcrben
hmm, now it's copying stuff over to app_sync! this is a massive repo, I guess it just took a while to start working on it
Johan Hernefeldt
@presidenten

Hi!
Is it possible to use the same docker-sync.yml-file for both osx and win?
Im using this on osx at the moment, and havent tried on win yet.

version: "2"
options:
  verbose: true
syncs:
  #IMPORTANT: ensure this name is unique and does not match your other application container name
  build-tools-sync: #tip: add -sync and you keep consistent names as a convention
    src: './'
    sync_host_ip: 'auto'
    sync_host_port: 10872
sync_strategy: 'unison'

Will it work on windows?
Or do I need sync_args: ['-perms=0']? Do I need something else?

David Laban
@alsuren

I managed to attach strace to unison wheneugenmayer/unison:2.51.2.1 was stuck in an infinite loop.

docker run -it --pid=host --privileged --cap-add SYS_PTRACE ubuntu bash
root@1900e1436ebe:/# apt update && apt install strace
...
root@a6e0f2f6fa53:/# strace -k -y -p 4363 2>&1 | head
strace: Process 4363 attached
strace: [ Process PID=4363 runs in x32 mode. ]
strace: [ Process PID=4363 runs in 64 bit mode. ]
read(7</host_sync/src/REDACTED.py (deleted)>, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 65536) = 65536
 > /usr/local/bin/unison() [0x2431f2]
read(7</host_sync/src/REDACTED.py (deleted)>, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 65536) = 65536
 > /usr/local/bin/unison() [0x2431f2]
read(7</host_sync/src/REDACTED.py (deleted)>, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 65536) = 65536
 > /usr/local/bin/unison() [0x2431f2]
read(7</host_sync/src/REDACTED.py (deleted)>, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 65536) = 65536

It seems to be reading an infinite stream of nulls from a file. I suspect that strace's "(deleted)" annotation might be a red herring though, because I didn't have the /host_sync/ volume mounted in the ubuntu container.
Is this enough to submit a bug upstream, or should I try to disassemble the unison binary to find out what 0x2431f2 is (I couldn't find a way to get useful backtraces out of a running ocaml binary)?

Damien Desrousseaux
@ddesrousseaux
Hi
I need some help with the latest docker-sync version because I added 3 syncs volume in a docker-sync.yml..
In my docker-compose, I attached the volumes like that in my docker services:
services:
  pay-back-nginx:
    container_name: pay-back-nginx
    restart: on-failure
    build:
      context: ./docker-services/nginx
    volumes:
      - pay-back-src-sync:/var/www/html:nocopy
      - pay-back-logsnginx-sync:/var/log/nginx:nocopy

And then I have the global volumes declaration like that:

volumes:
    pay-back-src-sync:
      external: true
    pay-back-logsmcorp-sync:
      external: true
    pay-back-logsnginx-sync:
      external: true

And when I try to start/stop my containers, I keep getting this error message:
ERROR: Named volume "pay-back-logsmcorp-sync:/mcorp/data/log/paymentbackws:nocopy" is used in service "pay-back-php" but no declaration was found in the volumes section. make: *** [stop] Error 1

When I remove the ":dest directory:nocopy" in the service volumes, I don't get the error message but it doesn't work because the destination is unknown (as :dest in docker-sync is deprecated).
What am I doing wrong?