From bd5f213a9f5ba9cfb896c1a282e3adcb1a49fdb9 Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Wed, 25 Apr 2018 08:23:06 +0200 Subject: [PATCH 1/2] Update to f29 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b7487e4..656b1cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # This image is the base image for all s2i configurable container images. -FROM registry.fedoraproject.org/fedora:28 +FROM registry.fedoraproject.org/fedora:29 ENV SUMMARY="Base image which allows using of source-to-image." \ DESCRIPTION="The s2i-core image provides any images layered on top of it \ From fe23a11d5deabc3dea586f0c853f5c63f3d0ee3b Mon Sep 17 00:00:00 2001 From: Petr Kubat Date: Thu, 24 May 2018 09:42:41 +0200 Subject: [PATCH 2/2] Pull changes from upstream master (3bb932c) --- Dockerfile | 9 +-------- root/usr/bin/prepare-yum-repositories | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 656b1cb..eece213 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ 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=2 \ + RELEASE=3 \ ARCH=x86_64 LABEL summary="$SUMMARY" \ @@ -34,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