Skip to content

Add rootless Docker support and update documentation#1549

Open
sireeshajonnalagadda wants to merge 13 commits intodevcontainers:mainfrom
sireeshajonnalagadda:rootless_socket
Open

Add rootless Docker support and update documentation#1549
sireeshajonnalagadda wants to merge 13 commits intodevcontainers:mainfrom
sireeshajonnalagadda:rootless_socket

Conversation

@sireeshajonnalagadda
Copy link
Contributor

@sireeshajonnalagadda sireeshajonnalagadda commented Jan 29, 2026

This PR fixes the issue for rootless docker

  • Introduced socketPath option for custom Docker socket configuration in README and devcontainer-feature.json.
  • Updated install script to accommodate rootless Docker socket paths.
  • Added tests for rootless Docker configurations and custom socket paths.
  • Created new documentation for rootless Docker setups and scenarios.
    Checklist
    Changes works as expected for both root and rootless docker environments.

Key Points

  1. *socketPath option: Configures where the feature expects the socket inside the container
  2. Mount source: Must match your host's actual Docker socket location
  3. Mount target: Must match the socketPath option value
  4. XDG_RUNTIME_DIR: Usually /run/user/{uid} for rootless Docker

Test Scenarios

The test scenarios demonstrate:

  • rootless_docker_socket: Standard rootless configuration
  • custom_rootless_socket_path: Custom socket path
  • xdg_runtime_dir_socket: XDG runtime directory style
  • root_docker_socket: Standard root Docker (for comparison)

@sireeshajonnalagadda sireeshajonnalagadda marked this pull request as ready for review February 17, 2026 05:32
@sireeshajonnalagadda sireeshajonnalagadda requested a review from a team as a code owner February 17, 2026 05:32
@sireeshajonnalagadda sireeshajonnalagadda marked this pull request as draft March 5, 2026 06:09
Copy link
Contributor

@Kaniska244 Kaniska244 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sireeshajonnalagadda

I have left few comments. Please get back in case of any issues.

buildx=(docker-buildx-plugin)
fi
apt-get -y install --no-install-recommends ${cli_package_name}${cli_version_suffix} "${buildx[@]}" docker-compose-plugin
if [ "${DOCKER_DASH_COMPOSE_VERSION}" != "v1" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the relevance of this check for rootless Docker support?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 @sireeshajonnalagadda Did we not need this before; if so, how? Also, since they are both very similiar, can we do:

install cli package + buildx
if not Docker v1
   install docker-compose-plugin

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have this documentation in the test directory? If any change required, couldn't this be done in the readme file or even as PR comment if applicable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, the file was misplaced. The rootless socket information has already been added to README.md. ROOTLESS_DOCKER.md provides clear examples on how to configure d-o-d feature with rootless docker setup. I will remove it from here and add a summary in the PR comment.
Thanks!

],
"containerUser": "vscode"
},
"xdg_runtime_dir_socket": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we really need this test when it appears to be quite similar to rootless_docker_socket scenario?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just another variant of using custom socket path. If it appears redundant I will remove this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, could you please remove this too?

"moby": false
}
},
"mounts": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need the explicit mounts for this case as I guess this should be the default behavior. isn't it?

…eSwitch and remove obsolete ROOTLESS_DOCKER.md documentation
@sireeshajonnalagadda sireeshajonnalagadda marked this pull request as ready for review March 12, 2026 08:27
@Kaniska244 Kaniska244 self-requested a review March 12, 2026 10:05
},
"containerUser": "vscode"
},
"custom_rootless_socket_path": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this identical to rootless_docker_socket (just with different socketPaths)? Both are custom.

Copy link
Contributor

@abdurriq abdurriq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation LGTM, some test changes requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants