1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-25 06:17:50 +00:00
catalog/task/docker-build/0.1
PuneetPunamiya 5a3e5f630f Adds category field as an annotation as tekton.dev/categories
- Initially all tags were mapped to categories in Hub,
     for e.g. config.yaml: https://github.com/tektoncd/hub/blob/master/config.yaml,
     so whenever a new tag was added in a task it was mapped to a category called `others`.
     Hence before every release we had to manually map these new tags to some category,
     hence after the discussion in Catalog and Hub WG, a proposal was created for adding
     a category as an annotation.

   - PR to update the TEP-0003-Tekton Catalog Organization: https://github.com/tektoncd/community/pull/352

Signed-off-by: Puneet Punamiya <ppunamiy@redhat.com>
2021-07-26 13:15:08 +01:00
..
samples Add docker-build task 2020-07-24 10:09:01 +01:00
tests Add add_task helper function for tests 2020-10-07 17:51:55 +01:00
docker-build.yaml Adds category field as an annotation as tekton.dev/categories 2021-07-26 13:15:08 +01:00
OWNERS Add docker-build task 2020-07-24 10:09:01 +01:00
README.md Update self reference from master to main 🧙 2021-03-19 11:09:49 +00:00

Docker

Docker-Build

The Docker Build task builds source into a container image using Docker. This command executes the directives in the Dockerfile to assemble a container image, then pushes that image to a container registry.

Install the Docker Build Task

kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/docker-build/0.1/docker-build.yaml

Parameters

  • image: The name (reference) of the image to build.
  • builder_image: The name of the image containing the Docker tool. See note below. (default: docker.io/docker:latest)
  • dind_image: The name of the image used by docker-in-docker sidecar container (default: docker:dind).
  • dockerfile: The path to the Dockerfile to execute (default: ./Dockerfile)
  • context: Path to the directory to use as context (default: .)
  • build_extra_args: Extra parameters passed for the build command when building images. (default: "")
  • push_extra_args: Extra parameters passed for the push command when pushing images. (default: "")

Workspaces

  • source: A Workspace volume containing the source to build.

Usage

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: docker
spec:
  params:
  - name: image
    value: localhost:5000/nocode
  taskRef:
    name: docker-build
  workspaces:
  - name: source
    persistentVolumeClaim:
      claimName: docker-source-pvc