Bug 1300790

Summary: [RFE] Dockerfiles customer facing for images provided by Red Hat for Openshift 3
Product: OpenShift Container Platform Reporter: Ryan Howe <rhowe>
Component: ContainersAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED NOTABUG QA Contact: DeShuai Ma <dma>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: aos-bugs, eminguez, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-28 17:54:26 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 Ryan Howe 2016-01-21 17:27:57 UTC
Description of problem:

Requesting that all Openshift Enterprise related images provide the dockerfile used to create the image in a universal location, either inside the image, via documentation, or upstream codebase for upstream versions. 

List of images
https://access.redhat.com/search/#/container-images?q=openshift&p=1&sort=relevant&rows=12&srch=any&documentKind=ImageRepository

OpenShift 3 base
                     
  registry.access.redhat.com/openshift3/jenkins-1-rhel7             
  registry.access.redhat.com/openshift3/logging-auth-proxy          
  registry.access.redhat.com/openshift3/logging-deployment          
  registry.access.redhat.com/openshift3/logging-elasticsearch       
  registry.access.redhat.com/openshift3/logging-fluentd             
  registry.access.redhat.com/openshift3/logging-kibana              
  registry.access.redhat.com/openshift3/metrics-cassandra           
  registry.access.redhat.com/openshift3/metrics-deployer            
  registry.access.redhat.com/openshift3/metrics-hawkular-metrics    
  registry.access.redhat.com/openshift3/metrics-heapster            
  registry.access.redhat.com/openshift3/mongodb-24-rhel7            
  registry.access.redhat.com/openshift3/mysql-55-rhel7              
  registry.access.redhat.com/openshift3/node                        
  registry.access.redhat.com/openshift3/nodejs-010-rhel7            
  registry.access.redhat.com/openshift3/openvswitch                 
  registry.access.redhat.com/openshift3/ose                         
  registry.access.redhat.com/openshift3/ose-deployer                
  registry.access.redhat.com/openshift3/ose-docker-builder          
  registry.access.redhat.com/openshift3/ose-docker-registry         
  registry.access.redhat.com/openshift3/ose-f5-router               
  registry.access.redhat.com/openshift3/ose-haproxy-router          
  registry.access.redhat.com/openshift3/ose-keepalived-ipfailover   
  registry.access.redhat.com/openshift3/ose-pod                     
  registry.access.redhat.com/openshift3/ose-recycler                
  registry.access.redhat.com/openshift3/ose-sti-builder             
  registry.access.redhat.com/openshift3/perl-516-rhel7              
  registry.access.redhat.com/openshift3/php-55-rhel7                
  registry.access.redhat.com/openshift3/postgresql-92-rhel7         
  registry.access.redhat.com/openshift3/python-33-rhel7             
  registry.access.redhat.com/openshift3/ruby-20-rhel7  

Jboss 
 
    registry.access.redhat.com/jboss-amq-6-openshift3_beta/amq-openshift             
  registry.access.redhat.com/jboss-amq-6/amq-openshift                             
  registry.access.redhat.com/jboss-datagrid-6/datagrid65-openshift                 
  registry.access.redhat.com/jboss-decisionserver-6/decisionserver62-openshift     
  registry.access.redhat.com/jboss-eap-6-openshift3_beta/eap-openshift             
  registry.access.redhat.com/jboss-eap-6/eap-openshift                             
  registry.access.redhat.com/jboss-webserver-3-openshift3_beta/tomcat7-openshift   
  registry.access.redhat.com/jboss-webserver-3-openshift3_beta/tomcat8-openshift   
  registry.access.redhat.com/jboss-webserver-3/tomcat7-openshift                   
  registry.access.redhat.com/jboss-webserver-3/tomcat8-openshift 

Fuse

  registry.access.redhat.com/jboss-fuse-6/fis-java-openshift    
  registry.access.redhat.com/jboss-fuse-6/fis-karaf-openshift

Comment 1 Eduardo Minguez 2016-01-27 09:12:36 UTC
AFAIK, dockerfiles are included in /root/buildinfo/Dockerfile-XXX

docker run -it --rm -u root registry.access.redhat.com/openshift3/mysql-55-rhel7 "cat /root/buildinfo/Dockerfile-openshift3-mysql-55-rhel7-5.5-16"
FROM 6c3a84d798dc449313787502060b6d5b4694d7527d64a7c99ba199e3b2df834e

# MySQL image for OpenShift.
#
# Volumes:
#  * /var/lib/mysql/data - Datastore for MySQL
# Environment:
#  * $MYSQL_USER - Database user name
#  * $MYSQL_PASSWORD - User's password
#  * $MYSQL_DATABASE - Name of the database to create
#  * $MYSQL_ROOT_PASSWORD (Optional) - Password for the 'root' MySQL account

ENV MYSQL_VERSION=5.5 \
    HOME=/var/lib/mysql

LABEL summary="MySQL is a multi-user, multi-threaded SQL database server" \
      io.k8s.description="MySQL is a multi-user, multi-threaded SQL database server" \
      io.k8s.display-name="MySQL 5.5" \
      io.openshift.expose-services="3306:mysql" \
      io.openshift.tags="database,mysql,mysql55"

# Labels consumed by Red Hat build service
LABEL BZComponent="openshift-mysql-docker" \
      Name="openshift3/mysql-55-rhel7" \
      Version="5.5" \
      Release="16" \
      Architecture="x86_64"

EXPOSE 3306

# This image must forever use UID 27 for mysql user so our volumes are
# safe in the future. This should *never* change, the last test is there
# to make sure of that.
RUN yum install -y yum-utils gettext hostname && \
    yum-config-manager --enable rhel-server-rhscl-7-rpms && \
    yum-config-manager --enable rhel-7-server-optional-rpms && \
    yum install -y --setopt=tsflags=nodocs bind-utils mysql55 && \
    yum clean all && \
    mkdir -p /var/lib/mysql/data && chown -R mysql.0 /var/lib/mysql && \
    test "$(id mysql)" = "uid=27(mysql) gid=27(mysql) groups=27(mysql)"

# Get prefix path and path to scripts rather than hard-code them in scripts
ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/mysql \
    MYSQL_PREFIX=/opt/rh/mysql55/root/usr \
    ENABLED_COLLECTIONS=mysql55

# When bash is started non-interactively, to run a shell script, for example it
# looks for this variable and source the content of this file. This will enable
# the SCL for all scripts without need to do 'scl enable'.
ENV BASH_ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \
    ENV=${CONTAINER_SCRIPTS_PATH}/scl_enable \
    PROMPT_COMMAND=". ${CONTAINER_SCRIPTS_PATH}/scl_enable"

ADD root /

# this is needed due to issues with squash
# when this directory gets rm'd by the container-setup
# script.
RUN rm -rf /etc/my.cnf.d/* 
RUN /usr/libexec/container-setup

VOLUME ["/var/lib/mysql/data"]

USER 27

ENTRYPOINT ["container-entrypoint"]
CMD ["run-mysqld"]

Comment 2 Brenton Leanhardt 2016-01-28 17:54:26 UTC
Eduardo is correct.  That's probably the best we're going to do for now.  If this isn't suitable for the customer let us know and we can help you direct a more specific request to the appropriate team.