Description of problem:
BuildConfig inline Dockerfile fails with heredoc syntax
Version-Release number of selected component (if applicable):
4.17, 4.18, 4.19
How reproducible:
Always
Steps to Reproduce:
1. Apply the following resources:
```
apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
labels:
ad-hoc: build-inline-dockerfile-heredoc
name: foo
---
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
labels:
ad-hoc: build-inline-dockerfile-heredoc
name: foo
spec:
output:
to:
kind: ImageStreamTag
name: foo:latest
resources:
requests:
cpu: .5
memory: 10Mi
limits:
cpu: 1
memory: 100Mi
source:
dockerfile: |
FROM registry.access.redhat.com/ubi9/ubi:latest
COPY --chmod=+x <<EOF /entrypoint.sh
#!/bin/bash
printf "hello world!"
EOF
ENTRYPOINT ["/entrypoint.sh"] strategy:
type: Docker
```
2. Start the build:
```
$ oc start-build foo --follow
```
Actual results:
Build fails with: error: EOF: unterminated heredoc
Expected results:
The heredoc (<<EOF … EOF) in the inline Dockerfile should be parsed and passed correctly into the build process, resulting in a valid /entrypoint.sh.
Additional info:
- blocks
-
OCPBUGS-64857 BuildConfig inline Dockerfile fails with heredoc syntax
-
- New
-
- incorporates
-
RUN-3615 Fix a test error for OCPBUGS-62210
-
- Code Review
-
- is cloned by
-
OCPBUGS-64857 BuildConfig inline Dockerfile fails with heredoc syntax
-
- New
-
- links to