def METHOD_NAME(self, install_debugpy: bool = False) -> None:
    """Internal use only.
    Constructs the Dockerfile instructions based on properties.
    :param install_debugpy: Whether to install debugpy. Defaults to False.
    :type install_debugpy: bool
    """
    self._instructions = []
    if self._docker_base_image:
        self._instructions = [From(self._docker_base_image)]
    else:
        self._instructions = [self._dockerfile]
    if self._docker_port:
        self._instructions.extend(
            [
                Run(f"mkdir -p {self._docker_azureml_app_path}"),
                Workdir(self._docker_azureml_app_path),
            ]
        )
    if self._docker_conda_file_name and self._docker_azureml_app_path:
        self._instructions.extend(
            [
                Copy(
                    [
                        f"{self._docker_conda_file_name}",
                    ],
                    self._docker_azureml_app_path,
                ),
                Run(
                    (
                        f"conda env create -n {LocalEndpointConstants.CONDA_ENV_NAME} "
                        f"--file {self._docker_conda_file_name}"
                    )
                ),
            ]
        )
        if install_debugpy:
            self._instructions.extend(
                [Run(f"conda run -n {LocalEndpointConstants.CONDA_ENV_NAME} pip install debugpy")]
            )
        self._instructions.extend(
            [
                Cmd(
                    [
                        "conda",
                        "run",
                        "--no-capture-output",
                        "-n",
                        LocalEndpointConstants.CONDA_ENV_NAME,
                        "runsvdir",
                        "/var/runit",
                    ]
                ),
            ]
        )
    else:
        if install_debugpy:
            self._instructions.extend([Run("pip install debugpy")])
        self._instructions.extend(
            [
                Cmd(["runsvdir", "/var/runit"]),
            ]
        )