3.8M

Build a Docker image build

Build a Dockerfile and push it to the internal Codefresh registry.

arguments

  • build_arguments - A set of Docker build arguments to pass to the build process.
  • disable_push - Do not push to any registry automatically.
  • dockerfile - The path to the Dockerfile from which the image is built. The default is Dockerfile.
  • image_name - The name for the image you build.
  • no_cache - Disable Docker engine cache for the build. more info
  • no_cf_cache - Disable Codefresh build optimization for the build. more info
  • provider
  • registry - The registry logical name of one of the inserted registries from the integration view.
  • registry_contexts - The registry logical name of one of the inserted registries from the integration view. The default values is primary registries by domain. Note that this is needed to do docker login to specified registries.
  • squash
  • tag - The tag that is assigned to the image you build. The default is the name of the branch or revision that is built.
  • tags - Multiple tags under which to push the image.
  • target - target stage in a multistage build (build will run until this stage)
  • working_directory - The directory in which the build command is executed. It can be an explicit path in the container’s file system, or a variable that references another step. The default is ${{main_clone}}.
    Docker-Build:
  title: Building docker image
  type: build
  working_directory: '${{CLONE_STEP_NAME}}'
  arguments:
    image_name: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
    tag: master

  
    GCBuild:
  title: Building docker image
  type: build
  working_directory: '${{CLONE_STEP_NAME}}'
  arguments:
    image_name: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
    tag: master
    provider:
      type: gcb
      arguments:
        google_app_creds: '${{G_CREDS_B64}}'
        cache:
          repo: '${{CF_REPO_OWNER}}/kaniko-cache'
          ttl: 10h
        timeout: 600s
        machineType: N1_HIGHCPU_8
        logsBucket: 'gs://your-project_id_cloudbuild/logs'
        diskSizeGb: 10

  
github.com
Codefresh INC
Jun 10, 2020