Skip to content

Instantly share code, notes, and snippets.

@sub-mod
Last active April 27, 2020 23:42
Show Gist options
  • Save sub-mod/0857cfd96cc79a52feb8f850fe6ff8c3 to your computer and use it in GitHub Desktop.
Save sub-mod/0857cfd96cc79a52feb8f850fe6ff8c3 to your computer and use it in GitHub Desktop.
simple-buildConfig with Dockerbuild Strategy.
---
apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
name: test-bc-sample
spec:
lookupPolicy:
local: false
---
kind: "BuildConfig"
apiVersion: "build.openshift.io/v1" #3.11 v1
metadata:
name: "test-sample-build"
spec:
source:
type: "Git"
git:
uri: "https://github.com/sub-mod/empty-repo"
dockerfile: |-
FROM centos:7
USER 0
RUN yum install -y centos-release-scl && yum install devtoolset-7 rh-python36 -y
RUN source scl_source enable devtoolset-7 rh-python36 && gcc --version && python -V
USER example
strategy:
type: "Docker"
dockerStrategy:
dockerfilePath: Dockerfile
output:
to:
kind: "ImageStreamTag"
name: "test-bc-sample:latest"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment