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

feat(volume): Add device with colon support #673

Closed
wants to merge 1 commit into from

Conversation

idsulik
Copy link
Contributor

@idsulik idsulik commented Aug 10, 2024

Closes #docker/compose#12052

Added device with colon support, we used to support it before this commit 072aa64

Example:

services:
  app:
    image: alpine
    command: ["sh", "-c", "while true; do echo 'Hello, World!'; sleep 3; done"]
    devices:
      - /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0-port0:/dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0-port0:ro
      - /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.3:1.0-port0:/dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.3:1.0-port0

@idsulik idsulik requested a review from ndeloof as a code owner August 10, 2024 06:12
@ndeloof
Copy link
Collaborator

ndeloof commented Aug 19, 2024

I'm not a fan we introduce a special handling for /dev prefix as docker run does not support this either.
IMHO better introduce explicit support for "long syntax" in compose specification when setting a device mount, so user can disambiguate such a confusing path

@idsulik
Copy link
Contributor Author

idsulik commented Aug 19, 2024

I was going to add long syntax support myself, but it's already been done here #676 (review)

@idsulik idsulik closed this Aug 19, 2024
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.

2 participants