Skip to content

Instantly share code, notes, and snippets.

@oeuftete
Last active December 15, 2015 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oeuftete/c386e59f3bec42fbb7e4 to your computer and use it in GitHub Desktop.
Save oeuftete/c386e59f3bec42fbb7e4 to your computer and use it in GitHub Desktop.

Per https://docs.saltstack.com/en/latest/ref/states/all/salt.states.dockerng.html#salt.states.dockerng.running, this should pull the image.

hello_run:
  dockerng.running:
    - name: hello
    - image: ubuntu:14.04
local:
----------
          ID: hello_run
    Function: dockerng.running
        Name: hello
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1594, in call
                  **cdata['kwargs'])
                File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1491, in wrapper
                  return f(*args, **kwargs)
                File "/usr/lib/python2.7/dist-packages/salt/states/dockerng.py", line 1411, in running
                  image_id = __salt__['dockerng.inspect_image'](image)['Id']
                File "/usr/lib/python2.7/dist-packages/salt/modules/dockerng.py", line 2176, in inspect_image
                  ret = _client_wrapper('inspect_image', name)
                File "/usr/lib/python2.7/dist-packages/salt/modules/dockerng.py", line 601, in wrapper
                  return wrapped(*args, **salt.utils.clean_kwargs(**kwargs))
                File "/usr/lib/python2.7/dist-packages/salt/modules/dockerng.py", line 867, in _client_wrapper
                  exc.explanation)
              CommandExecutionError: Error 404: No such image: ubuntu:14.04
     Started: 19:06:51.870319
    Duration: 5.922 ms
     Changes:   

Summary for local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   5.922 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment