Which command produces a Dockerfile from an S2I build?

Prepare for the Red Hat OpenShift Developer II DO288 Exam with our quizzes. Study with flashcards and multiple choice questions, each with hints and explanations. Get ready for your certification!

Multiple Choice

Which command produces a Dockerfile from an S2I build?

Explanation:
S2I can generate a Dockerfile that mirrors how the image would be built. To create that Dockerfile, you run the build command with the source, the builder image, and a name, then specify the output path with the --as-dockerfile option. The correct form is s2i build <sourcecode> <image> <name> --as-dockerfile <destination>/Dockerfile. This writes the Dockerfile to the given location so you can inspect or modify it. The other options don’t fit: there is no create-dockerfile subcommand, and the flag to generate a Dockerfile is --as-dockerfile (not --dockerfile), and the typical usage places the flag after the required arguments.

S2I can generate a Dockerfile that mirrors how the image would be built. To create that Dockerfile, you run the build command with the source, the builder image, and a name, then specify the output path with the --as-dockerfile option. The correct form is s2i build --as-dockerfile /Dockerfile. This writes the Dockerfile to the given location so you can inspect or modify it. The other options don’t fit: there is no create-dockerfile subcommand, and the flag to generate a Dockerfile is --as-dockerfile (not --dockerfile), and the typical usage places the flag after the required arguments.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy