Bug 1293794

Summary: Failded to docker build with ruby-20-rhel7 images and ruby-hello-world repo
Product: OKD Reporter: XiuJuan Wang <xiuwang>
Component: ImageAssignee: Ben Parees <bparees>
Status: CLOSED CURRENTRELEASE QA Contact: Wang Haoran <haowang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, mmccomas
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-12 17:11:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description XiuJuan Wang 2015-12-23 05:52:22 UTC
Description of problem:
When do docker build with ruby-20 images and https://github.com/openshift/ruby-hello-world.git repo, will meet below error:

Step 7 : RUN scl enable rh-ruby22 "bundle install"
 ---> Running in c609429a7aa7
Unable to open /etc/scl/conf/rh-ruby22!
F1223 03:39:39.148313       1 builder.go:70] Build error: The command '/bin/sh -c scl enable rh-ruby22 "bundle install"' returned a non-zero code: 1

Works for ruby-22 images

Version-Release number of selected component (if applicable):
openshift/ruby-20-rhel7  e69babf2d300
openshift3/ruby-20-rhel7 e4af9621f3fa

How reproducible:
always

Steps to Reproduce:
1.Create a dockerbuild app with ruby-20-rhel7 and ruby-hello-world repo.
 oc  new-app -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/build/ruby20rhel7-template-docker.json
2.Check build log
3.

Actual results:
2.Check build log
Step 7 : RUN scl enable rh-ruby22 "bundle install"
 ---> Running in c609429a7aa7
Unable to open /etc/scl/conf/rh-ruby22!
F1223 03:39:39.148313       1 builder.go:70] Build error: The command '/bin/sh -c scl enable rh-ruby22 "bundle install"' returned a non-zero code: 1

Expected results:
Could docker build

Additional info:
Should make this Dockerfile compatible with ruby-20 and ruby-22 images both.

https://github.com/openshift/ruby-hello-world/blob/master/Dockerfile
RUN scl enable rh-ruby22 "bundle install"
CMD ["scl", "enable", "rh-ruby22", "./run.sh"]

Comment 2 XiuJuan Wang 2015-12-24 10:36:40 UTC
As comment #1, verified this bug.