Passing variables and parameters to a Job similar to running Docker from CLI

Is there a way to pass options I would pass to Docker cli to a Concourse-CI Job that is using a Docker Image?

I have a custom Docker Image that requires that a volume or two be mounted when the container is ran.

The Image is also set as an executable with an ENTRYPOINT. How would I use that Image and pass it variables, and volumes?

There are a couple of ways it could be done. However, before I mention those, you might want to revisit this as an approach to use. Having done things like this, can’t recommend going down that path. Instead, the Docker Image Resource is your friend and it can be effectively marshaled to fit many scenarios such as this.

However, if you want to persist, you have some options:

  • Use docker-in-docker. If you have a docker-in-docker image, it can be used in a task. It will require privileged and it will be a bit layer-skipping and tricky to manage though, and feel wonky in use.
  • Use the a task with an image containing docker client pointed at some remote system. It’ll be difficult to manage secrets and there’s another set of infrastructure to manage.
  • Use your own custom resource, possibly even extending the Docker Image Resource. Logically this is the same as using docker-in-docker but in a resource.

If you lay out your scenario, we could comment more directly.