How can I add parameters to a dockerio.running state in Salt?
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?
2 Solutions collect form web for “How can I add parameters to a dockerio.running state in Salt?”
Have you tried this?
salt 'dockerhost' docker.run 'progrium/consul -server -bootstrap'
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"