Docker-sync: Unable to find image 'eugenmayer/unison:latest' locally

Created on 30 Mar 2018  路  8Comments  路  Source: EugenMayer/docker-sync

Error

When I clean / start my stack after the upgrade of the gem to the version 0.5.7 I have the following error:

          ok  Found explicit docker-compose-dev.yml and using it from docker-compose-dev.yml
Removing network pharmonyone_default
Network pharmonyone_default not found.
     success  Finished cleaning up your app stack
     success  Finished cleanup. Removed stopped, removed sync container and removed their volumes
       note:  You can also run docker-sync in the background with docker-sync start
          ok  Starting native_osx for sync app-sync
Unable to find image 'eugenmayer/unison:latest' locally
docker: Error response from daemon: manifest for eugenmayer/unison:latest not found.
See 'docker run --help'.
/Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/sync_strategy/native_osx.rb:96:in `start_container': Precopy failed (RuntimeError)
    from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/sync_strategy/native_osx.rb:116:in `run'
    from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/sync_process.rb:85:in `run'
    from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/sync_manager.rb:111:in `block in run'
    from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/sync_manager.rb:110:in `each'
    from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/sync_manager.rb:110:in `run'
    from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/tasks/stack/stack.thor:46:in `start'
    from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
    from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
    from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
    from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
    from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/bin/docker-sync-stack:15:in `<top (required)>'
    from /usr/local/bin/docker-sync-stack:22:in `load'
    from /usr/local/bin/docker-sync-stack:22:in `<main>'

Docker Driver

d4m

Sync strategy

default

your docker-sync.yml

version: "2"

options:
  # default: docker-compose.yml if you like, you can set a custom location (path) of your compose file like ~/app/compose.yml
  # HINT: you can also use this as an array to define several compose files to include. Order is important!
  compose-file-path: 'docker-compose.yml'

  # optional, default: docker-compose-dev.yml if you like, you can set a custom location (path) of your compose file. Do not set it, if you do not want to use it at all

  # if its there, it gets used, if you name it explicitly, it HAS to exist
  # HINT: you can also use this as an array to define several compose files to include. Order is important!
  compose-dev-file-path: 'docker-compose-dev.yml'

  # optional, activate this if you need to debug something, default is false
  # IMPORTANT: do not run stable with this, it creates a memory leak, turn off verbose when you are done testing
  verbose: false

  # ADVANCED: default:eugenmayer/rsync -  the image to use for the rsync container. Do not change this until you exactly know, what you are doing
  # optional, default eugenmayer/rsync, you cannot just use "some rsync" container, you entrypoint needs features, check the Dockerfiles
  rsync_image: 'eugenmayer/rsync'

  # ADVANCED: default:leighmcculloch/unison -  the image to use for the unison container. Do not change this until you exactly know, what you are doing
  # optional, default eugenmayer/unison, you cannot just use "some unison" container, you entrypoint needs features, check the Dockerfiles
  unison_image: 'eugenmayer/unison'

  # optional, default auto, can be docker-sync, thor or auto and defines how the sync will be invoked on the cli. Mostly depending if your are using docker-sync solo, scaffolded or in development ( thor )
  cli_mode: 'auto'
  # optional, maximum number of attempts for unison waiting for the success exit status. The default is 5 attempts (1-second sleep for each attempt). Only used in unison.
  max_attempt: 5

  # optional, default: pwd, root directory to be used when transforming sync src into absolute path, accepted values: pwd (current working directory), config_path (the directory where docker-sync.yml is found)
  project_root: 'pwd'

syncs:
  app-sync:
    # os aware sync strategy, default to unison under osx, and native docker volume under linux
    sync_strategy: 'native_osx'

    # which folder to watch / sync from - you can use tilde, it will get expanded.
    # the contents of this directory will be synchronized to the Docker volume with the name of this sync entry ('app-sync' here)
    src: '.'

    # optional, a list of excludes. These patterns will not be synced
    sync_excludes: ['.gitignore', '.git', 'log', 'tmp/cache']

    # use this to change the exclude syntax.
    # Path: you match the exact path ( nesting problem )
    # Name: If a file or a folder does match this string ( solves nesting problem )
    # Regex: Define a regular expression
    # none: You can define a type for each sync exclude, so sync_excludes: ['Name .git', 'Path Gemlock']
    #
    # for more see http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#pathspec
    sync_excludes_type: 'Name'

    # this does not user groupmap but rather configures the server to map
    # optional: usually if you map users you want to set the user id of your application container here
    sync_userid: '1000'

    # optional, a list of regular expressions to exclude from the fswatch - see fswatch docs for details
    watch_excludes: ['.*/.git', '.*/log', '.*/tmp/cache/', '.*/tmp/pids/', '.*/tmp/sessions/', '.*/tmp/sockets/', '.gitignore']

    # optional: use this to switch to fswatch verbose mode
    watch_args: '-v'

OS

macOS 10.13.3 (17D102)

Most helpful comment

please modify your docker-sync.yml

change unison_image: 'eugenmayer/unison' to unison_image: 'eugenmayer/unison:2.51.2.1'

it will pull the image accordingly

All 8 comments

The latest tag doesn't exist on Docker hub. I guess you built it on your local machine, changed in the code and forgot to revert it?

Obviously downgrading by running sudo gem uninstall docker-sync and selecting the 0.5.7 version fixed the issue.

remove alle the options please, you basically override 90% of the defaults. use only the options you really need... and if you obviously set the image explicitly, to the value you wonder about, it's broken :)

Thank you @EugenMayer for your answer. Basically I have copy/past the docker-sync.yml from your Wiki (well it has been updated since apparently) but I got it.

Anyways why is version 0.5.6 working with this setup and not 0.5.7. It's just a patch, not a minor version?

@zedtux

This is a configuration REFERENCE - do not use all options at once - they do not make sense! Or copy them as your starting point, rather use the docker-sync-boilerplate and then cherry pick the options you need.

Thats in big fat at https://github.com/EugenMayer/docker-sync/wiki/2.-Configuration#this-is-a-configuration-reference---do-not-use-all-options-at-once---they-do-not-make-sense-or-copy-them-as-your-starting-point-rather-use-the-docker-sync-boilerplate-and-then-cherry-pick-the-options-you-need :) So yes, it was never intended to copy any possible configuration value you could have and thus instead of keep the default, set a static value which then cannot be moved, as the image in your case.

Reduce your configuration to the bare minimum to keep yourself sane in the next upgrades, it will help you

Okay, thank you @EugenMayer for pointing it out. 馃槥 I will update my docker-sync.yml file

I had the same issue, solved by deleting options.unison_image param.

please modify your docker-sync.yml

change unison_image: 'eugenmayer/unison' to unison_image: 'eugenmayer/unison:2.51.2.1'

it will pull the image accordingly

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anlek picture anlek  路  7Comments

derschatta picture derschatta  路  8Comments

EugenMayer picture EugenMayer  路  7Comments

brucemead picture brucemead  路  3Comments

aandrushchenko picture aandrushchenko  路  5Comments