AZ-204 Develop Azure compute solutions Practice Question
You are deploying a containerized application to Azure App Service. The application requires a custom startup command and must pull the image from a private Azure Container Registry. You need to ensure the deployment succeeds and the container starts correctly. (Choose two.)
⚠ Common exam trap
The trap here is focusing on port or image name settings while overlooking that private registry access requires explicit credentials and that a custom startup command must be configured separately.
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
✓
Set the startup command in the App Service configuration to override the container's default entrypoint.
To deploy a container from a private Azure Container Registry, you must supply registry credentials via the DOCKER_REGISTRY_SERVER_URL, DOCKER_REGISTRY_SERVER_USERNAME, and DOCKER_REGISTRY_SERVER_PASSWORD application settings. To use a custom startup command, you must set the startup command in the App Service configuration. Together, these two actions ensure the image can be pulled and the container starts with the required command.
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 the WEBSITES_PORT application setting to the port that the container listens on.
Why it's wrong here
WEBSITES_PORT tells App Service which port the container is listening on for incoming HTTP traffic. While important for routing, it does not address the requirement to pull from a private registry or to set a custom startup command. The scenario specifically requires private registry access and a custom startup command, so this setting alone does not meet the needs.
- ✗
Set the DOCKER_CUSTOM_IMAGE_NAME application setting to the full image name and tag.
Why it's wrong here
DOCKER_CUSTOM_IMAGE_NAME specifies which image to deploy, but it does not provide authentication to a private registry or define a startup command. You still need registry credentials and a startup command override. This setting alone would not enable pulling from a private Azure Container Registry or ensure the custom startup command is used, so it does not satisfy the requirements.
- ✓
Set the startup command in the App Service configuration to override the container's default entrypoint.
Why this is correct
App Service allows you to specify a custom startup command that overrides the container's default entrypoint. This is configured in the App Service's configuration settings, often via the Azure portal or CLI. It ensures the container starts with the required command, which is necessary when the default entrypoint does not match the application's needs. This directly addresses the custom startup command requirement.
- ✓
Set the DOCKER_REGISTRY_SERVER_URL, DOCKER_REGISTRY_SERVER_USERNAME, and DOCKER_REGISTRY_SERVER_PASSWORD application settings with the ACR credentials.
Why this is correct
When using a private Azure Container Registry, App Service needs credentials to pull the image. The DOCKER_REGISTRY_SERVER_URL, DOCKER_REGISTRY_SERVER_USERNAME, and DOCKER_REGISTRY_SERVER_PASSWORD application settings provide these credentials. Without them, the deployment fails because App Service cannot authenticate to the private registry. This is the standard method for configuring private registry access.
- ✗
Enable the 'Always On' setting to keep the container running continuously.
Why it's wrong here
Always On keeps the app loaded and prevents idle unload, but it does not affect the ability to pull from a private registry or set a startup command. While useful for continuous availability, it is unrelated to the deployment requirements of private registry authentication and custom startup command. Enabling it would not resolve deployment failures related to those needs.
Go deeper
Related to this question
About these practice questions
One of 883 original AZ-204 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Microsoft exam blueprint
This AZ-204 practice question is part of Courseiva's free Microsoft 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 AZ-204 exam.