dockerconcourseconcourse-resource-types

What is the difference between docker-image and registry-image in concourse?


In Concourse, under the resources section, i sometimes encounter the type registry-image and sometimes the type docker-image.

resources:

  - name: some-image   
    type: registry-image      
    source:                   
      repository: 1234567890.dkr.ecr.eu-west-1.amazonaws.com/some-image
      tag: 2.4.5              

  - name: other-image
    type: docker-image
    source:
      repository: 1234567890.dkr.ecr.eu-west-1.amazonaws.com/other-image
      tag: latest

They look similar but what is exactly the difference?


Solution

  • While googling i found the answer on the github page of registry-image

    This resource is intended as a replacement for the Docker Image resource. Here are the key differences:

    • This resource is implemented in pure Go and does not use the Docker daemon or CLI. This makes it safer (no need for privileged: true), more efficient, and less error-prone (now that we're using Go APIs and not parsing docker CLI output).

    • This resource has stronger test coverage.

    • This resource does not and will never support building - only registry image pushing/pulling. Building should instead be done with something like the oci-build task (or anything that can produce OCI image tarballs).

    • A goal of this resource is to stay as focused and simple as possible. The Docker Image resource grew way too large and complicated. There are simply too many ways to build and publish Docker images. It will be easier to support many smaller resources + tasks rather than one huge interface.