Skip to content

Commit eec3687

Browse files
committed
Update usage to proper detection of name
Add to examples Dockerfile and Dockerfile.s2i notes what source-to-image means Signed-off-by: Petr "Stone" Hracek <[email protected]>
1 parent d0e9036 commit eec3687

File tree

6 files changed

+34
-8
lines changed

6 files changed

+34
-8
lines changed

2.4-micro/s2i/bin/usage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To use it, install S2I: https://github.com/openshift/source-to-image
1515
1616
Sample invocation:
1717
18-
s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ ${NAMESPACE}/httpd-24-${DISTRO}7 httpd-sample-app
18+
s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ ${NAMESPACE}/httpd-24${DISTRO} httpd-sample-app
1919
2020
You can then run the resulting image via:
2121
podman run -p 8080:8080 httpd-sample-app

2.4/s2i/bin/usage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To use it, install S2I: https://github.com/openshift/source-to-image
1515
1616
Sample invocation:
1717
18-
s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ ${NAMESPACE}/httpd-24-${DISTRO}7 httpd-sample-app
18+
s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ ${NAMESPACE}/httpd-24${DISTRO} httpd-sample-app
1919
2020
You can then run the resulting image via:
2121
podman run -p 8080:8080 httpd-sample-app

examples/Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
FROM registry.redhat.io/rhel8/httpd-24
1+
FROM registry.redhat.io/rhel10/httpd-24
2+
3+
# This image supports the Source-to-Image
4+
# In order to support the Source-to-Image framework, there are some interesting
5+
# scripts inside the builder image, that can be run in a Dockerfile directly as well:
6+
# * The `/usr/libexec/s2i/assemble` script inside the image is run in order
7+
# to produce a new image with the application artifacts.
8+
# The script takes sources of a given application and places them into
9+
# appropriate directories inside the image.
10+
# * The `/usr/libexec/s2i/run` script executes the application and is set as
11+
# a default command in the resulting container image.
212

313
# Add application sources
414
ADD app-src/index.html /var/www/html/index.html

examples/Dockerfile.s2i

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
FROM registry.redhat.io/rhel8/httpd-24
1+
FROM registry.redhat.io/rhel10/httpd-24
22

33
# This image supports the Source-to-Image
4-
# (see more at https://docs.openshift.com/container-platform/3.11/creating_images/s2i.html).
54
# In order to support the Source-to-Image framework, there are some interesting
65
# scripts inside the builder image, that can be run in a Dockerfile directly as well:
76
# * The `/usr/libexec/s2i/assemble` script inside the image is run in order

examples/sample-test-app/Dockerfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
FROM registry.redhat.io/rhel8/httpd-24
1+
FROM registry.redhat.io/rhel10/httpd-24
22

3+
# This image supports the Source-to-Image
4+
# In order to support the Source-to-Image framework, there are some interesting
5+
# scripts inside the builder image, that can be run in a Dockerfile directly as well:
6+
# * The `/usr/libexec/s2i/assemble` script inside the image is run in order
7+
# to produce a new image with the application artifacts.
8+
# The script takes sources of a given application and places them into
9+
# appropriate directories inside the image.
10+
# * The `/usr/libexec/s2i/run` script executes the application and is set as
11+
# a default command in the resulting container image.
312
# Add application sources
413
ADD index.html /var/www/html/index.html
514

examples/sample-test-app/Dockerfile.s2i

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
FROM registry.redhat.io/rhel8/httpd-24
1+
FROM registry.redhat.io/rhel10/httpd-24
22

3+
# This image supports the Source-to-Image
4+
# In order to support the Source-to-Image framework, there are some interesting
5+
# scripts inside the builder image, that can be run in a Dockerfile directly as well:
6+
# * The `/usr/libexec/s2i/assemble` script inside the image is run in order
7+
# to produce a new image with the application artifacts.
8+
# The script takes sources of a given application and places them into
9+
# appropriate directories inside the image.
10+
# * The `/usr/libexec/s2i/run` script executes the application and is set as
11+
# a default command in the resulting container image.
312
# Add application sources
413
ADD . /tmp/src
514

615
# Assemble script installs the dependencies
7-
# TODO: describe what assemble does, and link to https://docs.openshift.com/container-platform/3.11/creating_images/s2i.html
816
RUN /usr/libexec/s2i/assemble
917

1018
# Run script uses standard ways to run the application

0 commit comments

Comments
 (0)