0

when writing a build config in openshift, i can copy multiple directories from one container to another like this

source:
    images:
      - from:
          kind: ImageStreamTag
          name: 'builder:latest'
        paths:
          - destinationDir: .
            sourcePath: /opt/app-root/src/dist/.
          - destinationDir: .
            sourcePath: /opt/app-root/src/openshift/conf/.

how can i do the same thing using oc new-build ?

I tried

oc new-build --source-image=builder --source-image-path=/opt/app-root/src/dist/.:. --source-image-path=/opt/app-root/src/openshift/conf/.:. --image-stream=openshift/nginx
oc new-build  --source-image=builder --source-image-path /opt/app-root/src/dist/.:. /opt/app-root/src/openshift/conf/.:. --image-stream=openshift/nginx
oc new-build  --source-image=builder --source-image-path=[/opt/app-root/src/dist/.:.,/opt/app-root/src/openshift/conf/.:.] --image-stream=openshift/nginx

with the fist one only one directory is being copied! and the rest are throwing an error.

alixander
  • 426
  • 1
  • 7
  • 18
  • Does the 3rd one work with the square brackets? Just simple comma separation? – Will Gordon Apr 18 '19 at 11:42
  • you mean like `--source-image-path=/opt/app-root/src/dist/.:.,/opt/app-root/src/openshift/conf/.:.`i tried it. It takes .,/opt/app-root/src/openshift/conf:. as destination :/ – alixander Apr 18 '19 at 12:29

0 Answers0