From 31622b32fff4cc576df0c9f1e1f6bfd3c0a76e3c Mon Sep 17 00:00:00 2001 From: Petr Kubat Date: Apr 10 2019 07:29:28 +0000 Subject: Pull changes from upstream and rebase for: rebuild for latest rawhide --- diff --git a/Dockerfile b/Dockerfile index 1439454..414e438 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,8 @@ ENV \ APP_ROOT=/opt/app-root \ # The $HOME is not set by default, but some applications needs this variable HOME=/opt/app-root/src \ - PATH=/opt/app-root/src/bin:/opt/app-root/bin:$PATH + PATH=/opt/app-root/src/bin:/opt/app-root/bin:$PATH \ + PLATFORM="fedora" # This is the list of basic dependencies that all language container image can # consume. @@ -51,6 +52,9 @@ RUN INSTALL_PKGS="bsdtar \ # Copy extra files to the image. COPY ./root/ / +# Create a platform-python symlink if it does not exist already +RUN [ -e /usr/libexec/platform-python ] || ln -s /usr/libexec/system-python /usr/libexec/platform-python + # Directory with the sources is set as the working directory so all STI scripts # can execute relative to this path. WORKDIR ${HOME} diff --git a/README.md b/README.md index ff9397e..bae6eab 100644 --- a/README.md +++ b/README.md @@ -28,22 +28,23 @@ Two examples: * If you specify `BASH_ENV`, then all your `#!/bin/bash` scripts do not need to call `scl enable`. * If you specify `PROMPT_COMMAND`, then on execution of the -`docker exec ... /bin/bash` command, the collection will be automatically enabled. +`podman exec ... /bin/bash` command, the collection will be automatically enabled. *Note*: Executables in Software Collections packages (e.g., `ruby`) are not directly in a directory named in the `PATH` environment variable. This means that you cannot do: - $ docker exec ... ruby + $ podman exec ... ruby but must instead do: - $ docker exec ... /bin/bash -c ruby + $ podman exec ... /bin/bash -c ruby The `/bin/bash -c`, along with the setting the appropriate environment variable, ensures the correct `ruby` executable is found and invoked. +Note: while the examples in this README are calling `podman`, you can replace any such calls by `docker` with the same arguments Usage ------------------------ @@ -63,7 +64,7 @@ $ make build VERSIONS=core TARGET=rhel7 This image is available on DockerHub. To download it run: ```console -docker pull sclorg/s2i-core-centos7 +podman pull sclorg/s2i-core-centos7 ``` To build a Base image from scratch run: @@ -82,4 +83,5 @@ See also -------- Dockerfile and other sources are available on https://github.com/sclorg/s2i-base-container. In that repository you also can find another variants of S2I Base Dockerfiles. -Dockerfile for CentOS is called Dockerfile, Dockerfile for RHEL is called Dockerfile.rhel7. +The Dockerfile for CentOS is called Dockerfile, the Dockerfile for RHEL7 is called Dockerfile.rhel7, +the Dockerfile for RHEL8 is called Dockerfile.rhel8 and the Dockerfile for Fedora is Dockerfile.fedora. diff --git a/root/help.1 b/root/help.1 index 2f46315..bc055a8 100644 --- a/root/help.1 +++ b/root/help.1 @@ -32,7 +32,7 @@ Two examples: * If you specify \fB\fCBASH\_ENV\fR, then all your \fB\fC#!/bin/bash\fR scripts do not need to call \fB\fCscl enable\fR\&. * If you specify \fB\fCPROMPT\_COMMAND\fR, then on execution of the -\fB\fCdocker exec ... /bin/bash\fR command, the collection will be automatically enabled. +\fB\fCpodman exec ... /bin/bash\fR command, the collection will be automatically enabled. .PP \fINote\fP: @@ -44,7 +44,7 @@ This means that you cannot do: .RS .nf -$ docker exec ... ruby +$ podman exec ... ruby .fi .RE @@ -56,7 +56,7 @@ but must instead do: .RS .nf -$ docker exec ... /bin/bash \-c ruby +$ podman exec ... /bin/bash \-c ruby .fi .RE @@ -65,6 +65,9 @@ $ docker exec ... /bin/bash \-c ruby The \fB\fC/bin/bash \-c\fR, along with the setting the appropriate environment variable, ensures the correct \fB\fCruby\fR executable is found and invoked. +.PP +Note: while the examples in this README are calling \fB\fCpodman\fR, you can replace any such calls by \fB\fCdocker\fR with the same arguments + .SH Usage .PP Choose either the CentOS7 or RHEL7 base image: @@ -93,7 +96,7 @@ This image is available on DockerHub. To download it run: .RS .nf -docker pull sclorg/s2i\-core\-centos7 +podman pull sclorg/s2i\-core\-centos7 .fi .RE @@ -121,4 +124,5 @@ on all provided versions of s2i image.\fP Dockerfile and other sources are available on \[la]https://github.com/sclorg/s2i-base-container\[ra]\&. In that repository you also can find another variants of S2I Base Dockerfiles. -Dockerfile for CentOS is called Dockerfile, Dockerfile for RHEL is called Dockerfile.rhel7. +The Dockerfile for CentOS is called Dockerfile, the Dockerfile for RHEL7 is called Dockerfile.rhel7, +the Dockerfile for RHEL8 is called Dockerfile.rhel8 and the Dockerfile for Fedora is Dockerfile.fedora. diff --git a/root/usr/bin/cgroup-limits b/root/usr/bin/cgroup-limits index b9d4edc..9f1dc1f 100755 --- a/root/usr/bin/cgroup-limits +++ b/root/usr/bin/cgroup-limits @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/libexec/platform-python """ Script for parsing cgroup information