ironstar-io / tokaido

Zero-conf Drupal Local Development Environments with Docker
https://tokaido.io
BSD 3-Clause "New" or "Revised" License
57 stars 10 forks source link

Simultaneous duplicate downloads #187

Closed NigelCunningham closed 5 years ago

NigelCunningham commented 5 years ago

What happened:

I installed the Linux version of release 1.92 and ran tok up in a repository. The app downloaded fpm and drush at the same time, but downloaded and extracted both packages multiple (I think 3) times each. The additional downloads were started a while after the first one, so I could see the numbers on each line flitting between the progress of the different downloads, and saw multiple 'extracting' messages and progress. The duplicate downloads didn't seem to happen for the other components. I'm cloning over a 4G connection so perhaps bandwidth is a factor in reproducing the issue.

I stopped the clone the first time I saw this and restarted tok up, but got the same outcome, so I let it run to completion.

What you expected to happen:

I expected each component to be downloaded once only.

How to reproduce it (as minimally and precisely as possible):

I tried tok up on a 4G connection, using an unmodified repo that I assume had previously worked. I'll attach a copy of the docker-compose.tok.yml.

Anything else we need to know?: Happy to try new versions if it will help.

Environment:

NigelCunningham commented 5 years ago

docker-compose.yml that was used. I've just replaced the client name (which also had a dash in it) with "client-name".

# WARNING: THIS FILE IS MANAGED DIRECTLY BY TOKAIDO.
# DO NOT MAKE MODIFICATIONS HERE, THEY WILL BE OVERWRITTEN

version: "2"
services:
  unison:
    image: tokaido/unison:2.51.2
    ports:
    - "5000"
    environment:
    - UNISON_DIR=/tokaido/site
    - UNISON_UID=1001
    - UNISON_GID=1001
    volumes:
    - /tokaido/site
  syslog:
    image: tokaido/syslog:edge
    volumes:
    - /tokaido/logs
    labels:
      io.tokaido.managed: local
      io.tokaido.project: ""
  haproxy:
    image: tokaido/haproxy:edge
    ports:
    - "8080"
    - "8443"
    user: "1005"
    depends_on:
    - varnish
    - nginx
    labels:
      io.tokaido.managed: local
      io.tokaido.project: ""
  varnish:
    image: tokaido/varnish:edge
    ports:
    - "8081"
    user: "1004"
    volumes_from:
    - syslog
    depends_on:
    - nginx
    labels:
      io.tokaido.managed: local
      io.tokaido.project: ""
  nginx:
    image: tokaido/nginx:edge
    ports:
    - "8082"
    user: "1002"
    volumes_from:
    - syslog
    - unison
    depends_on:
    - fpm
    environment:
      DRUPAL_ROOT: docroot
    labels:
      io.tokaido.managed: local
      io.tokaido.project: ""
  fpm:
    image: tokaido/php72-fpm:edge
    ports:
    - "9000"
    user: "1001"
    volumes_from:
    - syslog
    - unison
    working_dir: /tokaido/site/
    depends_on:
    - syslog
    environment:
      DRUPAL_ROOT: docroot
      PHP_DISPLAY_ERRORS: "yes"
    labels:
      io.tokaido.managed: local
      io.tokaido.project: ""
  mysql:
    image: mysql:5.7
    ports:
    - "3306"
    command: --max_allowed_packet=1073741824 --ignore-db-dir=lost+found
    environment:
      MYSQL_DATABASE: tokaido
      MYSQL_PASSWORD: tokaido
      MYSQL_ROOT_PASSWORD: tokaido
      MYSQL_USER: tokaido
    volumes_from:
    - syslog
    volumes:
    - tok_client-name_mysql_database:/var/lib/mysql
    labels:
      io.tokaido.managed: local
      io.tokaido.project: ""
  drush:
    image: tokaido/admin72-heavy:edge
    hostname: tokaido
    ports:
    - "22"
    working_dir: /tokaido/site
    volumes_from:
    - syslog
    - unison
    environment:
      APP_ENV: local
      DRUPAL_ROOT: docroot
      PROJECT_NAME: client-name
      SSH_AUTH_SOCK: /ssh/auth/sock
    volumes:
    - tok_composer_cache:/home/tok/.composer/cache
    labels:
      io.tokaido.managed: local
      io.tokaido.project: ""
  mailhog:
    image: mailhog/mailhog:v1.0.0
    ports:
    - "1025"
    - "8025"
    labels:
      io.tokaido.managed: local
      io.tokaido.project: client-name
volumes:
  tok_client-name_tokaido_site:
    external: true
  tok_client-name_mysql_database:
    external: true
  tok_composer_cache:
    external: true
ironmike-au commented 5 years ago

Hey Nigel!

As we discussed in slack, this is just how Docker downloads images, and what you probably saw was the different layers of each docker image being downloaded. Totally normal and expected behaviour.

Thanks for checking in with us though! I'll close this one now.

Richo