0

I'm trying to run a 3rd party docker image from salt. From the command line, the required statement is something like:

docker run -d progrium/consul -server -bootstrap

From Salt however I don't know how to pass the parameters (-server and -bootstrap) Is there a way to do that?

regards, Frank

Frank Lee
  • 2,728
  • 19
  • 30

2 Answers2

1

You can peek at the Dockerfile, and use the entrypoint to pass to dockerng yourself.

docker_consul:
  dockerng.running:
    - name: consul
    - image: progrium/consul
    - port_bindings: "8500:8500"
    - restart_policy: always
    - entrypoint: "/bin/start -server -bootstrap"
Alyen
  • 11
  • 1
0

Have you tried this?

salt 'dockerhost' docker.run 'progrium/consul -server -bootstrap'
Utah_Dave
  • 4,531
  • 24
  • 23