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?

  • Restart a Docker service when config changes
  • Does putting ARG at top of Dockerfile prevent layer re-use?
  • cannot remove docker image, error response from daemon
  • RunContainer: Error response from daemon: Duplicate mount point (Kubernetes)
  • Mounting a host directory through docker-compose file version “3” and re-using the data-volume
  • “Unable to access jarfile” when trying to run a jar with docker
  • regards, Frank

  • `docker attach` command can't enter into a container unless Ctrl+C or Enter pressed
  • Open CV error failed to init raw1394 persisting in docker
  • Finding the layers and layer sizes for each Docker image
  • configuring specific path under DocumentRoot to HTTPS of Apache server running on container
  • How to build moby's ARM v7 Dockerfile?
  • Selenium server works with Docker on MacOS but not on Jenkins
  • 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"
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.