feat: Add support for mounting devices#2845
Merged
tedim52 merged 13 commits intokurtosis-tech:mainfrom Dec 11, 2025
Merged
Conversation
4 tasks
Collaborator
|
were you able to compile it locally? Looks like the CI fails with build errors. Can you try to debug those? |
Contributor
Author
|
Looks like now the checks have passed |
Collaborator
|
Thanks for the contribution @dzobbe ! |
tedim52
reviewed
Nov 28, 2025
tedim52
reviewed
Nov 28, 2025
tedim52
reviewed
Nov 28, 2025
tedim52
requested changes
Nov 28, 2025
Collaborator
tedim52
left a comment
There was a problem hiding this comment.
Looks great! Just a few minor comments.
Contributor
Author
|
I think I addressed the comments |
tedim52
approved these changes
Dec 11, 2025
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Dec 11, 2025
🤖 I have created a release *beep* *boop* --- ## [1.14.0](1.13.2...1.14.0) (2025-12-11) ### Features * Add support for mounting devices ([#2845](#2845)) ([78a237f](78a237f)) ### Bug Fixes * print error in non interactive termianl ([#2850](#2850)) ([5c33359](5c33359)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds device support to the Docker backend, bringing feature parity with the Kubernetes backend. Previously, the
devicesfield inServiceConfigwas only supported when running on Kubernetes. This change enables services running in Docker containers to access host devices (e.g.,/dev/tpm0,/dev/gpu0, etc.).It can be configured via an extended ethereum-package repo
https://github.com/ethpandaops/ethereum-package/pull/1251/files
Changes Made
devicesfield toCreateAndStartContainerArgsandCreateAndStartContainerArgsBuilderin the Docker managerWithDevices()method to the builder pattern for setting device pathsgetContainerHostConfig()to accept and process device paths, converting them to Docker'sDeviceMappingformatconvertDevicesToDockerDeviceMapping()helper function that maps device paths to Docker's device format with read-write-mknod permissionsstart_user_services.goto extract devices from service config and pass them through to the Docker container creationHow It Works
When a service config includes a
deviceslist (e.g.,devices = ["/dev/tpm0"]), the Docker backend now:container.DeviceMappingformatrwm) to the containerMotivation
This change enables services that require access to host hardware devices (such as TPM chips for attestation, GPUs, or other specialized hardware) to function correctly when running in Docker-based Kurtosis enclaves. Previously, such services would fail with "device not found" errors even when the device was specified in the Starlark service config.
Example Usage
service_config = ServiceConfig(
name = "tpm-service",
image = "my-image",
devices = ["/dev/tpm0"], # Device is now accessible in Docker containers
# ... other config
)## REMINDER: Tag Reviewers, so they get notified to review
Is this change user facing?
YES
References (if applicable)