Skip to content

Add rootless Docker support and update documentation - #1549

Merged
Abdurrahmaan Iqbal (abdurriq) merged 22 commits into
devcontainers:mainfrom
sireeshajonnalagadda:rootless_socket
Mar 26, 2026
Merged

Abdurrahmaan Iqbal (abdurriq) merged 22 commits into
devcontainers:mainfrom
sireeshajonnalagadda:rootless_socket

Conversation

@sireeshajonnalagadda

@sireeshajonnalagadda sireeshajonnalagadda commented Jan 29, 2026 •

Copy link
Copy Markdown
Contributor

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.
  • Older Docker CE versions that bundled buildx with CLI will still respect the installDockerBuildx: false setting
    Modern Docker CE versions with separate packages work as expected
  • Cleanup runs after installation so it can properly detect and remove bundled buildx files
  • Added explanatory comments for future maintainers

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

  • root_docker_socket: Standard root Docker (for comparison)

  • Checklist
    Changes works as expected for both root and rootless docker environments.

@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

@v-Kaniska244 Kaniska (v-Kaniska244) left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread src/docker-outside-of-docker/install.sh
Comment thread test/docker-outside-of-docker/ROOTLESS_DOCKER.md Outdated
Comment thread test/docker-outside-of-docker/scenarios.json Outdated
Comment thread test/docker-outside-of-docker/scenarios.json Outdated
Comment thread src/docker-outside-of-docker/devcontainer-feature.json Outdated
…eSwitch and remove obsolete ROOTLESS_DOCKER.md documentation
Comment thread src/docker-outside-of-docker/devcontainer-feature.json
@sireeshajonnalagadda
sireeshajonnalagadda marked this pull request as ready for review March 12, 2026 08:27
Comment thread test/docker-outside-of-docker/scenarios.json Outdated

Copy link
Copy Markdown
Contributor

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.

@sireeshajonnalagadda
sireeshajonnalagadda marked this pull request as draft March 24, 2026 05:17
Comment thread test/docker-outside-of-docker/scenarios.json
Comment thread test/docker-outside-of-docker/root_docker_socket.sh Outdated
Comment thread src/docker-outside-of-docker/install.sh
@abdurriq
Abdurrahmaan Iqbal (abdurriq) merged commit d3971c3 into devcontainers:main Mar 26, 2026
1 check passed
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