Reputation: 6189
In Openshift Origin, I need to build and deploy from a Dockerfile in my local filesystem. It isn't hosted on a git server. Anybody know how I can specify that in the URI?
source:
git:
ref: master
uri: https://github.com/some/project
type: Git
strategy:
dockerStrategy:
from:
kind: ImageStreamTag
name: java-centos:oracle-8-jdk
type: Docker
Also, I'm aware of passing the Dockerfile inline, but I don't want to do that. I want to be able to indicate where the Dockerfile is located in the filesystem.
I also tried:
oc new-app --name blog --strategy=docker C:\my\folder\containing\Dockerfile
Ted
Upvotes: 1
Views: 287
Reputation: 58523
Use:
oc new-build --name blog --strategy=docker --binary
This will create a build configuration for a binary input build, but nothing else.
Each time you want to run a build, you would run:
oc start-build blog --from-dir .
Run this in the directory where the Dockerfile
and other files are located.
Once the build has completed the first time, you can then run:
oc new-app --image-stream blog --name blog
to create a deployment for the application.
If it was a web application and you want to make it publicly access, you can then run:
oc expose svc/blog
Upvotes: 3