Creating Openshift BuildConfig with inline Dockerfile definition

58 views Asked by At

I'm following the steps in this link to create a BuildConfig on Openshift Cluster running eus v4.12

The tutorial uses inline Dockerfile definition in the step of creating the BuildConfig, I followed the tutorial but in this step it returned the error

error converting YAML to JSON: yaml:line14: could not find expected ':'

BuildConfig definition:

oc apply -f - <<EOF
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
 name: my-custom-ace-image
 namespace: ${OPEN_SHIFT_PROJECT}
 labels:
 name: my-custom-ace-image
spec:
 triggers: []
 source:
 type: dockerfile
 dockerfile: |
 FROM ace-server-prod:latest-amd64
 COPY HTTPEcho.bar /home/aceuser/initial-config/bars/HTTPEcho.bar
 strategy:
 type: Docker
 dockerStrategy:
 from:
 kind: ImageStreamTag
 name: 'ace-server-prod:latest-amd64'
 namespace: ${OPEN_SHIFT_PROJECT} 
 output:
 to:
 kind: ImageStreamTag
 name: 'my-custom-ace-image:latest-amd64'
 namespace: ${OPEN_SHIFT_PROJECT}
EOF
0

There are 0 answers