Uploaded image for project: 'OpenShift Builds'
  1. OpenShift Builds
  2. BUILD-1495

RFE: Add inline Dockerfile Support to Shipwright buildah strategy

XMLWordPrintable

    • Icon: Ticket Ticket
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      Similar to https://issues.redhat.com/browse/BUILD-1491

      BuildConfigs can contain inline Dockerfiles
      As an example: https://github.com/openshift/release/blob/0f8dec6a1d8b39d84356bee4afd25297b15dbfe0/clusters/app.ci/supplemental-ci-images/azure/base-images/test-base.yaml#L28

      There currently does not seem to be support for defining inline Dockerfiles in Shipwright, however it is fairly trivial to do so:

      Add a parameter

        - default: ""
          description: Dockerfile contents to use for build
          name: dockerfile-contents
          type: string
      

      process it if it exists, and then write it to the Dockerfile location with something like:

            if [ "${dockerfileContents}" != "" ]; then
              echo "${dockerfileContents}"
              cat <<EOF >"${dockerfile}"
              ${dockerfileContents}
            EOF 
            fi  
      

      This would make it easier to convert existing buildconfigs to shipwright builds.

              rh-ee-prathore Prateek Rathore
              rhn-engineering-jmontleo Jason Montleon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: