Skip to content

[Bug]: Container machine docs disagree on the home directory path #1678

@rohitg00

Description

@rohitg00

The new container machine docs describe the home directory in two different ways.

What I found

In docs/container-machine.md, the first section says:

Your repo lives in $HOME on macOS and is mounted at /Users/<username> inside the container machine.

But the quickstart right below it says:

container machine run -n dev pwd          # /home/<you> — your Mac home dir, mounted in

Those two paths point users in different directions:

  • /Users/<username> sounds like the macOS path is preserved inside the Linux machine
  • /home/<username> sounds like a normal Linux home directory

What the code seems to do

The implementation and tests point to /home/<username> as the machine user's home.

Sources/Services/MachineAPIService/Client/MachineConfiguration.swift:

public var home: String {
    "/home/\(username)"
}

The CLI test also checks for that exact path:

#expect(home == "/home/\(hostUsername)", "HOME should be set to /home/<username>")

Expected

The docs should use one clear story for this.

Something like:

Your macOS home is shared into the container machine and exposed as the Linux user's home at /home/<username>.

That keeps the docs aligned with the code and avoids users looking for their files under /Users/<username> inside the machine.

Why this matters

Container machines are meant to feel like a persistent Linux dev environment. The first thing users will check is pwd, $HOME, and where their repo is mounted. If the docs mention both /Users/<username> and /home/<username>, it is easy to think the mount is broken when it is actually just the doc wording.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions