Merge pull request #340 from zmiklank/exit_oc_tests_if_login_fails

Exit oc tests gracefully if login fails
This commit is contained in:
phracek 2022-06-10 08:44:57 +00:00
commit 5bfde53a71
51 changed files with 5345 additions and 0 deletions

View file

@ -0,0 +1,2 @@
app-src

View file

@ -0,0 +1,10 @@
FROM registry.access.redhat.com/ubi8/nodejs-12
# Add application sources
ADD app-src .
# Install the dependencies
RUN npm install
# Run script uses standard ways to run the application
CMD npm run -d start

View file

@ -0,0 +1,25 @@
FROM registry.access.redhat.com/ubi8/nodejs-12
# This image supports the Source-to-Image
# (see more at https://docs.openshift.com/container-platform/3.11/creating_images/s2i.html).
# In order to support the Source-to-Image framework, there are some interesting
# scripts inside the builder image, that can be run in a Dockerfile directly as well:
# * The `/usr/libexec/s2i/assemble` script inside the image is run in order
# to produce a new image with the application artifacts.
# The script takes sources of a given application and places them into
# appropriate directories inside the image.
# * The `/usr/libexec/s2i/run` script executes the application and is set as
# a default command in the resulting container image.
# Add application sources to a directory that the assemble script expects them
# and set permissions so that the container runs without root access
USER 0
ADD app-src /tmp/src
RUN chown -R 1001:0 /tmp/src
USER 1001
# Let the assemble script to install the dependencies
RUN /usr/libexec/s2i/assemble
# Run script uses standard ways to run the application
CMD /usr/libexec/s2i/run

View file

@ -0,0 +1,22 @@
Dockerfile examples
===================
This directory contains example Dockerfiles that demonstrate how to use the image with a Dockerfile and `docker build`.
For demonstration, we use an application code available at https://github.com/sclorg/nodejs-ex.git.
Pull the source to the local machine first:
```
git clone https://github.com/sclorg/nodejs-ex.git app-src
```
Then, build a new image from a Dockerfile in this directory:
```
docker build -f Dockerfile -t node-app .
```
And run the resulting image with the final application:
```
docker run -ti --rm node-app
```