Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Lumir Balhar
3d35060e3e Update from upstream 2021-12-06 07:05:05 +01:00
3 changed files with 25 additions and 9 deletions

View file

@ -83,7 +83,7 @@ $ make build VERSIONS=base TARGET=rhel7
This image is available on DockerHub. To download it run:
```console
podman pull sclorg/s2i-base-centos7
podman pull quay.io/centos7/s2i-base-centos7
```
To build a Base image from scratch run:

View file

@ -1,7 +1,10 @@
.nh
.TH OpenShift base images
.PP
This repository contains Dockerfiles for images which serve as base images with all the
essential libraries and tools needed for OpenShift language images, for example:
.RS
.IP \(bu 2
s2i\-ruby
\[la]https://github.com/sclorg/s2i-ruby-container\[ra]
@ -18,6 +21,8 @@ s2i\-perl
s2i\-php
\[la]https://github.com/sclorg/s2i-php-container\[ra]
.RE
.PP
This container image also installs several development libraries, that are
often required in the builder images above. It also includes NPM package manager.
@ -49,6 +54,8 @@ Normally, SCL requires manual operation to enable the collection you want to use
This is burdensome and can be prone to error.
The OpenShift S2I approach is to set Bash environment variables that
serve to automatically enable the desired collection:
.RS
.IP \(bu 2
\fB\fCBASH\_ENV\fR: enables the collection for all non\-interactive Bash sessions
.IP \(bu 2
@ -56,12 +63,14 @@ serve to automatically enable the desired collection:
.IP \(bu 2
\fB\fCPROMPT\_COMMAND\fR: enables the collection in interactive shell
.RE
.PP
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:
@ -73,7 +82,7 @@ This means that you cannot do:
.RS
.nf
$ docker exec <cid> ... ruby
$ podman exec <cid> ... ruby
.fi
.RE
@ -85,7 +94,7 @@ but must instead do:
.RS
.nf
$ docker exec <cid> ... /bin/bash \-c ruby
$ podman exec <cid> ... /bin/bash \-c ruby
.fi
.RE
@ -94,6 +103,9 @@ $ docker exec <cid> ... /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:
@ -112,9 +124,13 @@ $ make build VERSIONS=base TARGET=rhel7
.fi
.RE
.RS
.IP \(bu 2
\fBCentOS7 base image\fP
.RE
.PP
This image is available on DockerHub. To download it run:
@ -122,7 +138,7 @@ This image is available on DockerHub. To download it run:
.RS
.nf
docker pull sclorg/s2i\-base\-centos7
podman pull quay.io/centos7/s2i\-base\-centos7
.fi
.RE
@ -147,7 +163,7 @@ on all provided versions of s2i image.\fP
.SH See also
.PP
Dockerfile and other sources are available on
\[la]https://github.com/sclorg/s2i-base-container\[ra]\&.
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.

View file

@ -6,7 +6,7 @@
# IMAGE_NAME specifies a name of the candidate image used for testing.
# The image has to be available before this script is executed.
#
IMAGE_NAME=${IMAGE_NAME-centos/s2i-base-centos7-candidate}
test -n "${IMAGE_NAME-}" || { echo 'make sure $IMAGE_NAME is defined'; exit 1; }
test_docker_run_usage() {
echo "Testing 'docker run' usage..."