Skip to content

liuxiaoyu-git/openshift-dockerfile-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

openshift-dockerfile-example

Example of building and deploying from a Dockerfile in Openshift 4.

How to build and run

  1. $ oc new-app --name sleep https://github.com/svejk-ciber/openshift-dockerfile-example.git You can also use the argument --strategy=docker to be explicit, but in this case there is no ambguity, since there are no other source files present than the Dockerfile, so Openshift should not choose a different build strategy than Docker.
  2. $ oc status Should not indicate any problems, apart from missing probes.
  3. Check the build log for errors: $ oc logs bc/sleep
  4. Wait for the pod to become running: $ oc get pods -w
  5. Check the log of the running container: $ oc logs sleep-1...
  6. Observe that new-app has created the following resources: one build configuration, one deployemnt configuration one replication controller, one build and two image streams (oc get bc|dc|is|rc|build|pod...)

About

Example of building and deploying from a Dockerfile in Openshift 4.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 100.0%