2

Am trying create a state file sls to make sure latest image is available before launching docker container using salt.

my salt-minion version is 2015.8.1 and my docker-py version 1.5

prep sentry images:
  dockerng.image_present:
    - force: true
    - name:
        - redis:latest

Although the above block returns the following error

 Comment: Encountered error pulling prep sentry images:latest: Missing Docker credentials. Please see the dockerng remote execution module documentation for information on how to configure authentication.

When I try to login to client via ssh and pull the image with docker pull redis it works fine and docker doesn't ask for credentials

When docker is pulled the script does not fail though,

can someone advise please?

Mo J. Mughrabi
  • 195
  • 2
  • 7

2 Answers2

1

You must specify credentials in your config

https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.dockerng.html#authentication

skitoo
  • 11
  • 1
0

Your sls file does not look correct. Try this one:

prep sentry images:
  dockerng.image_present:
    - force: true
    - name: redis:latest

In your example docker is trying to pull 'prep sentry images'.

Alen Komljen
  • 156
  • 3