This is a very simplistic approach to a specific use-case:
We have various docker base images that we would like to pull in to build from.
We currently use the registry-image-resource to pull this base image in oci format to satisfy the FROM requirement in our Dockerfiles from a private repository using ARG:
Dockerfile
ARG base_image=base
FROM ${base_image}
...
Pipeline
resources:
- base
type: registry-image
source:
aws_access_key_id: ((id))
aws_secret_access_key: ((key)
aws_region: ((region))
repository: base-dotnet
tag: 1.0.0
jobs:
...
# we trigger the pipeline some other way
- get: base
params:
format: oci
- task: build
privileged: true
config:
image_resource:
type: registry-image
source:
repository: concourse/oci-build-task
inputs:
- name: base
...
We now would like to parallelize our builds of multiple docker images - we produce a json that contains metadata about each of docker images we want to build - including the base we want to use - this is what requires us to override the source configuration for repository and tag:
This is a very simplistic approach to a specific use-case:
We have various docker
base
images that we would like to pull in to build from.We currently use the
registry-image-resource
to pull thisbase
image in oci format to satisfy theFROM
requirement in our Dockerfiles from a private repository usingARG
:Dockerfile
Pipeline
We now would like to parallelize our builds of multiple docker images - we produce a json that contains metadata about each of docker images we want to build - including the base we want to use - this is what requires us to override the source configuration for
repository
andtag
:metadata.json
Pipeline
Now clearly this will have implications if we wanted to use the
base
/registry-image-resource
to trigger.Any thoughts around a better way to achieve what we want? cc @taylorsilva