brikis98 / docker-osx-dev

A productive development environment with Docker on OS X
http://www.ybrikman.com/writing/2015/05/19/docker-osx-dev/
MIT License
1.43k stars 106 forks source link

Bug introduced with 1a1d6370f6fa75159ace63ce9a8204e0c8c10631: tar: could not chdir to '/engagement-chat' #200

Closed BKStephens closed 5 years ago

BKStephens commented 7 years ago

I have traced this issue down to 1a1d6370f6fa75159ace63ce9a8204e0c8c10631.

With 049056a13eb9b5d251804e6c9fba2405bc2e2be9, the preceding commit, everything works:

curl -o /usr/local/bin/docker-osx-dev https://raw.githubusercontent.com/brikis98/docker-osx-dev/049056a13eb9b5d251804e6c9fba2405bc2e2be9/src/docker-osx-dev
chmod +x /usr/local/bin/docker-osx-dev
docker-osx-dev install
docker-osx-dev

but with 1a1d6370f6fa75159ace63ce9a8204e0c8c10631, when I run:

curl -o /usr/local/bin/docker-osx-dev https://raw.githubusercontent.com/brikis98/docker-osx-dev/1a1d6370f6fa75159ace63ce9a8204e0c8c10631/src/docker-osx-dev
chmod +x /usr/local/bin/docker-osx-dev
docker-osx-dev install
docker-osx-dev

I get the following output:

2017-01-06 13:44:06 [INFO] Using sync paths from Docker Compose file at docker-compose.yml: /Users/benstephens/repos/engagement /Users/benstephens/repos/engagement-chat /engagement-chat/node_modules /engagement_bundle /engagement/node_modules /Users/benstephens/repos/unity-notify /unity-notify_bundle
2017-01-06 13:44:06 [INFO] Complete list of paths to sync: /Users/benstephens/repos/engagement /Users/benstephens/repos/engagement-chat /engagement-chat/node_modules /engagement_bundle /engagement/node_modules /Users/benstephens/repos/unity-notify /unity-notify_bundle
2017-01-06 13:44:06 [INFO] Using excludes from ignore file .dockerignore: engagement-compose/.git engagement-chat/node_modules engagement-chat/.git engagement-chat/tmp engagement-chat/.idea engagement/node_modules engagement/tmp engagement/.idea unity-notify/.git unity-notify/coverage unity-notify/tmp unity-notify/.idea
2017-01-06 13:44:06 [INFO] Complete list of paths to exclude: engagement-compose/.git engagement-chat/node_modules engagement-chat/.git engagement-chat/tmp engagement-chat/.idea engagement/node_modules engagement/tmp engagement/.idea unity-notify/.git unity-notify/coverage unity-notify/tmp unity-notify/.idea
2017-01-06 13:44:06 [INFO] Complete list of paths to include:
2017-01-06 13:44:06 [INFO] Starting docker-osx-dev file syncing
2017-01-06 13:44:06 [INFO] Testing if docker machine is running
Error: No machine name(s) specified and no "default" machine exists.
2017-01-06 13:44:07 [INFO] Installing rsync in the Docker Host image
2017-01-06 13:44:08 [INFO] Performing initial sync of paths: /Users/benstephens/repos/engagement /Users/benstephens/repos/engagement-chat /engagement-chat/node_modules /engagement_bundle /engagement/node_modules /Users/benstephens/repos/unity-notify /unity-notify_bundle
2017-01-06 13:44:09 [INFO] Initial sync using tar for /engagement-chat/node_modules
tar: could not chdir to '/engagement-chat'

tar: short read
exit status 1

I am wondering if the - in the directory name is causing an issue. @genezys as the author of 1a1d6370f6fa75159ace63ce9a8204e0c8c10631, do you have any ideas on what the problem is?

genezys commented 7 years ago

@BKStephens Can you post the output of the command docker-compose config for this project?

BKStephens commented 7 years ago
docker-compose config
networks: {}
services:
  engagement:
    build:
      context: /Users/benstephens/repos/engagement-compose
      dockerfile: Dockerfile.engagement
    command: npm run hot
    depends_on:
    - engagement_db
    - engagement_db_test
    - engagement_memcached
    - engagement_redis
    environment:
      ...
    network_mode: bridge
    ports:
    - 4022:4022
    - 8081:8081
    - 1234:1234
    volumes:
    - /Users/benstephens/repos/engagement:/engagement:rw
    volumes_from:
    - service:engagement_bundle:rw
    - service:engagement_node_modules:rw
  engagement-chat:
    build:
      context: /Users/benstephens/repos/engagement-compose
      dockerfile: Dockerfile.engagement-chat
    command: npm start
    depends_on:
    - engagement-chat_db
    - engagement-chat_redis
    - engagement-chat_db_test
    - engagement-chat_redis_test
    - engagement
    environment:
      ...
    ports:
    - 3009:3009
    volumes:
    - /Users/benstephens/repos/engagement-chat:/engagement-chat:rw
    volumes_from:
    - service:engagement-chat_node_modules:rw
  engagement-chat_db:
    environment:
      ...
    image: postgres:9.5
    ports:
    - 5434:5432
  engagement-chat_db_test:
    environment:
      ...
    image: postgres:9.5
    ports:
    - 5435:5432
  engagement-chat_node_modules:
    image: busybox
    volumes:
    - /engagement-chat/node_modules:rw
  engagement-chat_redis:
    image: redis
    ports:
    - 6379:6379
  engagement-chat_redis_test:
    image: redis
    ports:
    - 6378:6379
  engagement_bundle:
    image: busybox
    volumes:
    - /engagement_bundle:rw
  engagement_db:
    environment:
      ...
    image: postgres:9.5
    ports:
    - 5432:5432
  engagement_db_test:
    environment:
      ...
    image: postgres:9.5
    ports:
    - 5433:5432
  engagement_memcached:
    image: memcached
    ports:
    - 11211:11211
  engagement_node_modules:
    image: busybox
    volumes:
    - /engagement/node_modules:rw
  engagement_redis:
    image: redis
  mailcatcher:
    build:
      context: /Users/benstephens/repos/engagement-compose
      dockerfile: Dockerfile.mailcatcher
    command: mailcatcher --smtp-ip=0.0.0.0 --http-ip=0.0.0.0 --foreground
    ports:
    - 1080:1080
    - 1025:1025
  unity-notify:
    build:
      context: /Users/benstephens/repos/engagement-compose
      dockerfile: Dockerfile.unity-notify
    command: foreman start
    depends_on:
    - unity-notify_db
    - unity-notify_db_test
    - unity-notify_redis
    environment:
      ...
    network_mode: bridge
    ports:
    - 3050:3050
    - 1236:1236
    volumes:
    - /Users/benstephens/repos/unity-notify:/unity-notify:rw
    volumes_from:
    - service:unity-notify_bundle:rw
  unity-notify_bundle:
    image: busybox
    volumes:
    - /unity-notify_bundle:rw
  unity-notify_db:
    environment:
      ...
    image: postgres:9.5
    ports:
    - 5436:5432
  unity-notify_db_test:
    environment:
      ...
    image: postgres:9.5
    ports:
    - 5437:5432
  unity-notify_redis:
    image: redis
    ports:
    - 6380:6379
version: '2.0'
volumes: {}
genezys commented 5 years ago

Sorry for the (very) late answer.

You appear to have problematic paths in your volumes, like /engagement-chat/node_modules or /engagement_bundle. I suggest that you check your docker-compose.yml file or any other file contributing to it (override, includes, etc.)

I think this issue can be closed.

BKStephens commented 5 years ago

I no longer have access to this code now that I have changed jobs. Will close the issue.