How to switch user in debug container?

Patrick 5 Reputation points
2025-02-18T17:40:44.4233333+00:00

The documentation about debug containers mentions that it is possible to switch the user inside the debug container by running the following command:

switch-to-app-user

Full quote:

By default, debug console runs as root user. You can access /proc/1 to access container's file system if your container runs as root user. If your container doesn't run as root user, run below command to switch user before accessing /proc/1 directory, or you'll get a permission denied error.

However, unfortunately, the command is not available within the debug container:

bash: switch-to-app-user: command not found

Steps to reproduce:

  1. az containerapp debug --name [APP] --resource-group [RG]
  2. run switch-to-app-user
  3. access /proc/1/root without error

Do I miss something?

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
550 questions
{count} vote

Accepted answer
  1. Bowen Wan 0 Reputation points Microsoft Employee
    2025-02-28T09:27:40.7+00:00

    Hi Patrick,

    This is Bowen from Azure Container Apps production group. Please use "switch-user" as replacement for this command. We will update our doc soon to reflect this change. Sorry about the confusion.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.