Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Support for elevateIfNeeded property in devcontainer.json for Port Forwarding #1591

Open
bheijink opened this issue Jan 24, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@bheijink
Copy link

Description

Currently, when using the Devpod Desktop workspace, port forwarding for port 80 does not work as expected with the elevateIfNeeded property in the devcontainer.json file. This property is intended to automatically elevate permissions if necessary, but it seems to be unsupported in the Devpod environment.

Expected Behavior

The elevateIfNeeded property should be respected when port forwarding ports (e.g., port 80), allowing automatic permission elevation when needed, similar to its functionality when running a dev container directly from VSCode using the Dev Containers extension.

Steps to Reproduce:

  1. Set up a devcontainer.json file with forwardPorts including port 80 and the elevateIfNeeded property as shown below:
    {
      "runArgs": [
        "--privileged"
      ],
      "forwardPorts": [
        80
      ],
      "portsAttributes": {
        "80": {
          "label": "Application",
          "elevateIfNeeded": true
        }
      }
    }
  2. Open the workspace from Devpod Desktop.
  3. Notice that port forwarding does not work, even though the container should be elevated if needed.

Actual Behavior

Port forwarding works when starting the dev container directly from VSCode with the Dev Containers extension, but not when using Devpod Desktop.

Suggested Solution

Implement support for the elevateIfNeeded property for port forwarding within Devpod Desktop, ensuring that permissions are automatically elevated when necessary, in the same manner as the VSCode extension.

@pascalbreuninger pascalbreuninger added the bug Something isn't working label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants