origin: oc new-build: can't figure out how to specify image stream to overwrite FROM
I’m trying to create a Build that will take in source from one image and use another image as the build FROM. I’ve got this:
$ oc new-build --source-image pr-21-257717b093c5e0b975dd6042:src \
--source-image-path /data/src/github.com/openshift/image-registry/images/dockerregistry/ \
--image-stream pr-21-257717b093c5e0b975dd6042:origin-base \
--to pr-21-257717b093c5e0b975dd6042:origin-docker-registry \
--output json \
--dry-run
error: the image match "ci-openshift-ansible/pr-21-257717b093c5e0b975dd6042:origin-base" for source repository "pr-21-257717b093c5e0b975dd6042:src" does not appear to be a source-to-image builder.
- to attempt to use this image as a source builder, pass "--strategy=source"
- to use it as a base image for a Docker build, pass "--strategy=docker"
So I add the --strategy=docker and I get:
$ oc new-build --source-image pr-21-257717b093c5e0b975dd6042:src \
--source-image-path /data/src/github.com/openshift/image-registry/images/dockerregistry/ \
--image-stream pr-21-257717b093c5e0b975dd6042:origin-base \
--strategy docker \
--to pr-21-257717b093c5e0b975dd6042:origin-docker-registry \
--output json \
--dry-run
error: --strategy is specified and none of the arguments provided could be classified as a source code location
This seems wonky.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (18 by maintainers)
you could try passing --binary I forget if we let you launch a binary build w/o actually supplying binary content.