EugenMayer / docker-sync

Run your application at full speed while syncing your code for development, finally empowering you to utilize docker for development under OSX/Windows/*Linux
GNU General Public License v3.0
3.53k stars 289 forks source link

docker-sync start log full of errors after building, then crashes #499

Closed b1alpha closed 6 years ago

b1alpha commented 6 years ago

Error

the sync starts until I build assets then it fails a whole bunch and dies

...
rsync: failed to set permissions on "node_modules/redeyed/node_modules/.bin/esvalidate" (in volume): Not supported (95)
rsync: failed to set permissions on "node_modules/regenerator/node_modules/.bin/esparse" (in volume): Not supported (95)
rsync: failed to set permissions on "node_modules/regenerator/node_modules/.bin/esvalidate" (in volume): Not supported (95)
rsync: failed to set permissions on "node_modules/regjsparser/node_modules/.bin/jsesc" (in volume): Not supported (95)
rsync: failed to set permissions on "node_modules/semver-truncate/node_modules/.bin/semver" (in volume): Not supported (95)
rsync: failed to set permissions on "node_modules/send/node_modules/.bin/mime" (in volume): Not supported (95)
rsync: failed to set permissions on "node_modules/svgo/node_modules/.bin/js-yaml" (in volume): Not supported (95)
rsync: failed to set permissions on "node_modules/webpack/node_modules/.bin/acorn" (in volume): Not supported (95)
rsync: failed to set permissions on "node_modules/yargs/node_modules/.bin/window-size" (in volume): Not supported (95)
rsync: failed to set permissions on "vendor/bin/codecept" (in volume): Not supported (95)
rsync: failed to set permissions on "vendor/bin/dbunit" (in volume): Not supported (95)
rsync: failed to set permissions on "vendor/bin/doctrine" (in volume): Not supported (95)
rsync: failed to set permissions on "vendor/bin/doctrine-dbal" (in volume): Not supported (95)
rsync: failed to set permissions on "vendor/bin/doctrine.php" (in volume): Not supported (95)
rsync: failed to set permissions on "vendor/bin/pdepend" (in volume): Not supported (95)
rsync: failed to set permissions on "vendor/bin/phing" (in volume): Not supported (95)
rsync: failed to set permissions on "vendor/bin/php-parse" (in volume): Not supported (95)
rsync: failed to set permissions on "vendor/bin/phpcbf" (in volume): Not supported (95)
rsync: failed to set permissions on "vendor/bin/phpcs" (in volume): Not supported (95)
rsync: failed to set permissions on "vendor/bin/phpmd" (in volume): Not supported (95)
rsync: failed to set permissions on "vendor/bin/phpunit" (in volume): Not supported (95)
rsync: failed to set permissions on "vendor/bin/psysh" (in volume): Not supported (95)
rsync: failed to set permissions on "vendor/bin/robo" (in volume): Not supported (95)
rsync: failed to set permissions on "vendor/bin/swagger" (in volume): Not supported (95)rsync error: some files could not be transferred (code 23) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-52/rsync/main.c(996) [sender=2.6.9]
       error  Error starting sync, exit code 23
     message  
          ok  Cli mode is auto, selecting .. 
          ok  .. docker-sync 
     success  Starting to watch /Volumes/Dev/professional/ - Press CTRL-C to stop
     command  fswatch -orIE --event AttributeModified --event Created --event Link --event MovedFrom --event MovedTo --event Renamed --event Removed --event Updated '/Volumes/Dev/professional/'  | xargs -I -n1 docker-sync sync -n appcode-rsync-sync --config='/Volumes/Dev/professional/docker-sync.yml'
Sync appcode-rsync-sync       command  rsync --exclude='*.staging/' -ap '/Volumes/Dev/professional/' rsync://127.0.0.1:10872/volume
Sync appcode-rsync-sync         error  Error starting sync, exit code 23
Sync appcode-rsync-sync       message  
Sync appcode-rsync-sync       command  rsync --exclude='*.staging/' -ap '/Volumes/Dev/professional/' rsync://127.0.0.1:10872/volume
Sync appcode-rsync-sync         error  Error starting sync, exit code 23
Sync appcode-rsync-sync       message  
Sync appcode-rsync-sync       command  rsync --exclude='*.staging/' -ap '/Volumes/Dev/professional/' rsync://127.0.0.1:10872/volume
Sync appcode-rsync-sync         error  Error starting sync, exit code 23
Sync appcode-rsync-sync       message  
Sync appcode-rsync-sync       command  rsync --exclude='*.staging/' -ap '/Volumes/Dev/professional/' rsync://127.0.0.1:10872/volume
Sync appcode-rsync-sync         error  Error starting sync, exit code 23
Sync appcode-rsync-sync       message  

Docker Driver

d4m

Sync strategy

rsync

your docker-sync.yml

version: "2"
options:
  verbose: true
syncs:
  appcode-rsync-sync:
    src: './'
    sync_host_ip: 'auto'
    sync_host_port: 10872
    sync_strategy: 'rsync'
    sync_excludes: [ '*.staging/']

Docker-compose-dev.yml


services:
  app:
    image: sycle/app-dev
    build:
      dockerfile: build/docker/app-dev.dockerfile
    volumes:
      - appcode-rsync-sync:/var/www/:nocopy # will be mounted on /var/www

volumes:
  appcode-rsync-sync:
    external: true

OS

OSX 10.13.1

EugenMayer commented 6 years ago

All the errors are based due to symlinks are tried to be synced. Those issues are all in the issue queue, please search the closed issue. In short,You do never want to sync node_modules.. you really need to understand the docker basic paradigm here, so you can solve this using either a Dev entry point script or something else. Those things would be broken even if you use normal mounts Ind d4m ... But that is out of scope for docker-sync.. even if I would love to, we cannot be the docker school out of plain time issues