Skip to content

Commit 95773ba

Browse files
committed
fix(local): remove platform-gated SSH port mapping
The buildCreateArgs function skipped -p on Linux under the assumption that containers are reachable directly. But Up() always returns Host=127.0.0.1 and inspectSSHPort reads Docker's HostPort binding, so the port mapping is required on all platforms. Also remove the accidentally committed scheduler.test binary.
1 parent 34febd7 commit 95773ba

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

internal/local/local.go

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"fmt"
77
"os"
88
"path/filepath"
9-
"runtime"
109
"strings"
1110
)
1211

@@ -220,13 +219,11 @@ func (m *LocalManager) buildCreateArgs(containerName, projectDir, password strin
220219
args = append(args, "-e", "CONTAINER_SSH_AUTHORIZED_KEY="+key)
221220
}
222221

223-
// macOS/Windows: expose SSH port via Docker -p
224-
if runtime.GOOS != "linux" {
225-
if m.opts.Port > 0 {
226-
args = append(args, "-p", fmt.Sprintf("%d:22", m.opts.Port))
227-
} else {
228-
args = append(args, "-p", "0:22")
229-
}
222+
// Expose SSH port via Docker -p
223+
if m.opts.Port > 0 {
224+
args = append(args, "-p", fmt.Sprintf("%d:22", m.opts.Port))
225+
} else {
226+
args = append(args, "-p", "0:22")
230227
}
231228

232229
if m.opts.MemoryLimitMB > 0 {

scheduler.test

-6.58 MB
Binary file not shown.

0 commit comments

Comments
 (0)