Which s2i command tests a local build using the image phpbuild:latest with source in the ./app and tags it as php:1?

Prepare for the Red Hat Openshift Developer EX288 Exam. Study with comprehensive quizzes and flashcards. Each question includes hints and explanations to enhance your understanding. Ace your exam with confidence!

Multiple Choice

Which s2i command tests a local build using the image phpbuild:latest with source in the ./app and tags it as php:1?

Explanation:
The key idea is using the build flow of Source-to-Image to create a new image from local source. s2i build takes three things in order: the path to the local source, the builder image, and the name or tag for the output image. Here you want to build from the source in ./app, using the builder image phpbuild:latest, and tag the resulting image as php:1, so the command matches exactly: s2i build ./app phpbuild:latest php:1. Using s2i test would not produce a new built image with a tag; it tests an existing image instead. That’s why the option with test isn’t appropriate for performing a local build and tagging the result. Choosing a different output tag (like php without a version) or pointing to a different source path (like ./src) doesn’t align with the stated requirements, so those don’t fit the scenario.

The key idea is using the build flow of Source-to-Image to create a new image from local source. s2i build takes three things in order: the path to the local source, the builder image, and the name or tag for the output image. Here you want to build from the source in ./app, using the builder image phpbuild:latest, and tag the resulting image as php:1, so the command matches exactly: s2i build ./app phpbuild:latest php:1.

Using s2i test would not produce a new built image with a tag; it tests an existing image instead. That’s why the option with test isn’t appropriate for performing a local build and tagging the result.

Choosing a different output tag (like php without a version) or pointing to a different source path (like ./src) doesn’t align with the stated requirements, so those don’t fit the scenario.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy