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.