Question 122 of 500
Deploying applicationsmediumMultiple SelectObjective-mapped

Quick Answer

The correct answer involves using a custom runtime with a Dockerfile and adding binary installation commands to that Dockerfile. This is because the App Engine Flexible Environment allows you to completely replace the standard runtime image by providing your own Dockerfile, where you can use RUN commands to install any third-party binary that is not pre-installed. On the Google Professional Cloud Developer exam, this scenario tests your understanding of how Flexible differs from Standard—Standard restricts your environment, while Flexible gives you full control over the underlying VM. A common trap is assuming the startup_script field in app.yaml can handle complex installations, but it runs after the container starts and is not designed for building dependencies; the Dockerfile approach is the proper, reliable method. Remember the tip: if you need a binary not in the base image, go custom with a Dockerfile—think of it as “build it in, don’t bolt it on.”

PCD Deploying applications Practice Question

This PCD practice question tests your understanding of deploying applications. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A developer is deploying a Python web application to App Engine Flexible Environment. The application requires a specific third-party binary that is not pre-installed on the runtime image. Which two steps should the developer take to ensure the binary is available? (Choose two.)

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use a startup script in the app.yaml to install the binary.

Option D is correct because App Engine Flexible Environment supports a `startup_script` field in `app.yaml` that runs shell commands during instance initialization, allowing installation of third-party binaries. Option E is correct because using a custom runtime with a Dockerfile gives full control over the base image and dependencies, enabling the developer to install any required binary via `RUN` commands.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Configure a VM-level startup script in the Google Cloud Console.

    Why it's wrong here

    VM-level startup scripts are not used in App Engine Flexible Environment.

  • Specify the binary as a dependency in the requirements.txt file.

    Why it's wrong here

    requirements.txt is for Python packages only.

  • Include the binary in the application's Git repository and reference it in the app.yaml.

    Why it's wrong here

    This is not a standard practice; binaries should be installed via custom runtime or startup script.

  • Use a startup script in the app.yaml to install the binary.

    Why this is correct

    Startup scripts in app.yaml can run commands to install binaries.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Add the binary installation commands to a Dockerfile and use a custom runtime.

    Why this is correct

    A custom runtime with Dockerfile allows installing any dependencies.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates confuse App Engine Flexible Environment's `startup_script` with Compute Engine's VM-level startup scripts, or assume that `requirements.txt` can handle system dependencies, when in fact it only manages Python packages.

Detailed technical explanation

How to think about this question

Under the hood, App Engine Flexible Environment runs your application inside a Docker container based on a Google-provided runtime image. The `startup_script` in `app.yaml` is executed as a shell command before the application starts, allowing you to install packages using `apt-get` or download binaries. For a custom runtime, you define a `Dockerfile` that can use multi-stage builds to fetch and compile binaries, ensuring they are present in the final image. A real-world scenario is installing the `ffmpeg` binary for video processing; using a startup script or custom Dockerfile avoids the overhead of a full Compute Engine VM while meeting the dependency requirement.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

An e-commerce site experiences heavy traffic on Black Friday and near-zero traffic during off-peak weeks. Rather than provisioning permanent large VMs, the team uses auto-scaling groups that add capacity automatically under load and reduce it overnight. Questions like this test whether you understand elasticity, availability zones, and cloud compute scaling patterns.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PCD practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PCD practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PCD question test?

Deploying applications — This question tests Deploying applications — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Use a startup script in the app.yaml to install the binary. — Option D is correct because App Engine Flexible Environment supports a `startup_script` field in `app.yaml` that runs shell commands during instance initialization, allowing installation of third-party binaries. Option E is correct because using a custom runtime with a Dockerfile gives full control over the base image and dependencies, enabling the developer to install any required binary via `RUN` commands.

What should I do if I get this PCD question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 25, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PCD practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCD exam.