I have done the following
Steps to reproduce
--publish-socket takes host_path:container_path. If the host path itself
contains a colon, parsing fails.
container run --publish-socket "/tmp/backup-2026-08-18T10:30:00.sock:/var/run/app.sock" alpine sleep 100
Current output:
Error: invalid publish-socket format /tmp/backup-2026-08-18T10:30:00.sock:/var/run/app.sock. Expected: host_path:container_path
Problem description
The host path in --publish-socket can legitimately contain a colon (for
example a timestamped filename), but the parser splits the argument on
every ':' and only accepts exactly 2 parts. Any host path with more than
one colon is rejected as an "invalid publish-socket format", even though
it's a valid path.
The fix should split on the last colon instead of every colon. The
container-side path is always a plain absolute path, so the last colon is
always the correct split point.
This is the same class of bug already fixed for container cp in #1969 /
#1970 (paths split on every colon instead of the first one), just not
applied to --publish-socket.
Parsing lives in Parser.publishSocket in
Sources/Services/ContainerAPIService/Client/Parser.swift.
Environment
- OS: macOS 26.5.1 (25F80)
- Xcode: Command Line Tools 26.2.0
- Container: main branch (built from source)
Code of Conduct
I have done the following
Steps to reproduce
--publish-sockettakeshost_path:container_path. If the host path itselfcontains a colon, parsing fails.
Current output:
Problem description
The host path in --publish-socket can legitimately contain a colon (for
example a timestamped filename), but the parser splits the argument on
every ':' and only accepts exactly 2 parts. Any host path with more than
one colon is rejected as an "invalid publish-socket format", even though
it's a valid path.
The fix should split on the last colon instead of every colon. The
container-side path is always a plain absolute path, so the last colon is
always the correct split point.
This is the same class of bug already fixed for container cp in #1969 /
#1970 (paths split on every colon instead of the first one), just not
applied to --publish-socket.
Parsing lives in Parser.publishSocket in
Sources/Services/ContainerAPIService/Client/Parser.swift.
Environment
Code of Conduct