You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Yes - we would like to retrieve the default user set in a Docker image (defined by the USER instruction in the Dockerfile) when launching pods on RunPod. This is particularly useful for tools like SkyPilot, which rely on SSH access to the container. Currently, SSH attempts default to the root user, which fails when the image uses a non-root user. This leads to connection errors like:
RuntimeError: Failed to SSH to 213.181.111.2 after timeout 600s, with Error: ConnectionRefusedError: [Errno 111] Connection refused
We’ve worked around this issue by manually setting an environment variable SKYPILOT_DOCKER_SSH_USERNAME in skypilot-org/skypilot#4683, but this approach is not scalable or convenient for dynamic environments.
Describe the solution you'd like
We’d like RunPod to expose the default user of the Docker image through its API or container metadata. This could be done by adding a field in the create_pod API response or by providing an option to query the default user when the pod starts. This would allow automation tools to dynamically detect the correct SSH user without manual intervention.
Describe alternatives you've considered
Let user manually specify the docker user for each custom image, which adds overhead and is error-prone.
Using entrypoint scripts to detect and export the current user, but this complicates image maintenance and adds too much overheads.
Additional context
This issue surfaced while using SkyPilot to launch clusters on RunPod with custom images that have non-root default users. The current SSH mechanism attempts to connect as root, causing connection failures. Here’s a related SkyPilot issue for reference: skypilot-org/skypilot#4282.
Implementing this feature would improve compatibility with images following best practices (non-root users by default) and streamline automation workflows.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Yes - we would like to retrieve the default user set in a Docker image (defined by the
USER
instruction in the Dockerfile) when launching pods on RunPod. This is particularly useful for tools like SkyPilot, which rely on SSH access to the container. Currently, SSH attempts default to the root user, which fails when the image uses a non-root user. This leads to connection errors like:We’ve worked around this issue by manually setting an environment variable
SKYPILOT_DOCKER_SSH_USERNAME
in skypilot-org/skypilot#4683, but this approach is not scalable or convenient for dynamic environments.Describe the solution you'd like
We’d like RunPod to expose the default user of the Docker image through its API or container metadata. This could be done by adding a field in the create_pod API response or by providing an option to query the default user when the pod starts. This would allow automation tools to dynamically detect the correct SSH user without manual intervention.
Describe alternatives you've considered
Additional context
This issue surfaced while using SkyPilot to launch clusters on RunPod with custom images that have non-root default users. The current SSH mechanism attempts to connect as root, causing connection failures. Here’s a related SkyPilot issue for reference: skypilot-org/skypilot#4282.
Implementing this feature would improve compatibility with images following best practices (non-root users by default) and streamline automation workflows.
The text was updated successfully, but these errors were encountered: