From a62acf4707abc3afd656ea7ba6a478e953df9aff Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Wed, 27 Jun 2018 12:29:59 +0200 Subject: [PATCH] Pull changes from upstream master (3bb932c) --- Dockerfile | 16 ++++++++-------- root/usr/bin/prepare-yum-repositories | 15 +++++++++++++-- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 708ceaa..74a6666 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,14 @@ # This image is the base image for all s2i configurable container images. FROM registry.fedoraproject.org/fedora:28 -ENV SUMMARY="Base image which allows using of source-to-image." DESCRIPTION="The s2i-core image provides any images layered on top of it with all the tools needed to use source-to-image functionality while keeping the image size as small as possible." NAME=s2i-core VERSION=0 RELEASE=6 ARCH=x86_64 +ENV SUMMARY="Base image which allows using of source-to-image." \ + DESCRIPTION="The s2i-core image provides any images layered on top of it \ +with all the tools needed to use source-to-image functionality while keeping \ +the image size as small as possible." \ + NAME=s2i-core \ + VERSION=0 \ + RELEASE="7" \ + ARCH=x86_64 LABEL summary="$SUMMARY" \ description="$DESCRIPTION" \ @@ -27,13 +34,6 @@ ENV \ HOME=/opt/app-root/src \ PATH=/opt/app-root/src/bin:/opt/app-root/bin:$PATH -# 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=${APP_ROOT}/etc/scl_enable \ - ENV=${APP_ROOT}/etc/scl_enable \ - PROMPT_COMMAND=". ${APP_ROOT}/etc/scl_enable" - # This is the list of basic dependencies that all language container image can # consume. # Also setup the 'openshift' user that is used for the build execution and for the diff --git a/root/usr/bin/prepare-yum-repositories b/root/usr/bin/prepare-yum-repositories index 850701b..3b28993 100755 --- a/root/usr/bin/prepare-yum-repositories +++ b/root/usr/bin/prepare-yum-repositories @@ -1,6 +1,15 @@ #!/bin/bash # This script is used to prepare yum repositories, that are given as arguments. +# It is no-op if user also mounts the repo file(s) into the container during +# image build. This can be done by one of those commands: +# +# docker build -v /some/repo/file:/etc/yum.repos.d/sclorg_custom.repo +# docker build -v /some/repo/directory:/etc/yum.repos.d +# make CUSTOM_REPO=/some/repo/file/or/directory +# +# The last one works for projects where we have Makefile with the +# container-common-scripts support. set -ex @@ -20,8 +29,10 @@ function is_subscribed() { return 1 } -# if redhat.repo does not exist we have a mounted-in dir, do not enable repositories -[ -f /etc/yum.repos.d/redhat.repo ] || SKIP_REPOS_ENABLE=true +# DEBUGGING CASE! Mostly for 'make CUSTOM_REPO=/some/file/or/dir'. +test ! -f /etc/yum.repos.d/sclorg_custom.repo && \ +! mountpoint /etc/yum.repos.d \ + || exit 0 # install yum-utils for yum-config-manager yum install -y yum-utils