Search code examples
concourse

How to configure a custom resource type in a concourse pipeline?


I've already done a google search to find a way to setup a custom resource in concourse pipeline but the answers/documentation do not work.

Can someone provide a working example of custom resource type that is pulled from a local registry and used in a build plan?

For example, say I were to clone the git resource and slightly modify it and pushed it to my local registry. The git resource image would be name: localhost:5000/local_git:latest

How would you be able to use this custom resource (local_git:latest) in a pipeline definition?


Solution

  • There are two main settings to consider here when running a local registry:

    1. Must use insecure_registries:

      insecure_registries: ["my.local.registry:8080"]

    2. If you are running your registry in "localhost", you shouldn't use localhost as the address for your registry, if you do, the docker image will try to resolve to the localhost of the docker image instead of your local machine, in order to avoid this problem, use the IP address of your local machine. (DON'T use 127.0.0.1)