Page MenuHomePhorge

run
No OneTemporary

Authored By
Unknown
Size
756 B
Referenced Files
None
Subscribers
None
#!/bin/bash
#
# The 'run' performs a simple test that verifies that STI image.
# The main focus is that the image prints out the base-usage properly.
#
# 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-core-centos7-candidate}
test_docker_run_usage() {
echo "Testing 'docker run' usage..."
docker run --rm ${IMAGE_NAME} &>/dev/null
}
check_result() {
local result="$1"
if [[ "$result" != "0" ]]; then
echo "STI image '${IMAGE_NAME}' test FAILED (exit code: ${result})"
exit $result
fi
}
# Verify the 'usage' script is working properly when running the base image with 'docker run ...'
test_docker_run_usage
check_result $?

File Metadata

Mime Type
text/x-shellscript
Expires
Sat, Apr 4, 6:13 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18822810
Default Alt Text
run (756 B)

Event Timeline