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

docs: Correct windows instructions for migrating from docker #4157

Merged
merged 4 commits into from Oct 2, 2023

Conversation

foxydevloper
Copy link
Contributor

What does this PR do?

On windows, DOCKER_HOST is set to a named pipe instead of a socket, and podman has a seperate field for it, "PodmanPipe", the docs accidentally put "PodmanSocket" on windows. This also notes that you don't actually need to set DOCKER_HOST on windows, since podman already uses the default docker_engine named pipe.

How to test this PR?

Run command on windows

Signed-off-by: fox <12120644+foxydevloper@users.noreply.github.com>
Signed-off-by: fox <12120644+foxydevloper@users.noreply.github.com>
Copy link
Contributor

@cdrage cdrage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're completely correct, this should of been npipe:// I even see it's the same in the docker documentation as well: https://docs.docker.com/desktop/faqs/general/

Thanks for this contribution!

@foxydevloper
Copy link
Contributor Author

Fixed the build. Here's how the built docs look:
image

Signed-off-by: foxydevloper <12120644+foxydevloper@users.noreply.github.com>
Signed-off-by: foxydevloper <12120644+foxydevloper@users.noreply.github.com>
@cdrage cdrage merged commit 428efc9 into containers:main Oct 2, 2023
11 checks passed
@foxydevloper foxydevloper deleted the fix-windows-instructions branch October 2, 2023 13:36
@foxydevloper foxydevloper restored the fix-windows-instructions branch October 2, 2023 13:36
@podman-desktop-bot podman-desktop-bot added this to the 1.5.0 milestone Oct 2, 2023
@ReadingShades
Copy link
Contributor

Well, first of all, @foxydevloper thank you. I ran into this issue yesterday while installing podman for the first time in my Windows machine and finally solved it today with your aid.

On the other hand, I also suggest adding a note about command line emulators:

The export command to set environment variables only works io Git Bash in windows.

Mostly to clean it up for clarity/newbies (like me):

Windows socket manual configuration:

Command to get socket path config:

podman machine inspect --format '{{.ConnectionInfo.PodmanPipe.Path}}'

Changing all the backwards slashes for forward slashes.
Itshould look like:

//./pipe/podman-machine-default

To this path you must then add the prefix:

npipe://

The final path should look like

npipe:////./pipe/podman-machine-default

Commands to set the environment variable:

cmd:

set DOCKER_HOST=npipe://<inspect_command_output>

example:

set DOCKER_HOST=npipe:////./pipe/podman-machine-default

Git Bash:

export DOCKER_HOST=npipe://<inspect_command_output>

example:

export DOCKER_HOST=npipe:////./pipe/podman-machine-default

powershell:

$env:DOCKER_HOST="npipe://<inspect_command_output>"

note: Don't miss the quotes on the value or powershell will try to interpret it as a command.

example:

$env:DOCKER_HOST="npipe:////./pipe/podman-machine-default"

@foxydevloper
Copy link
Contributor Author

foxydevloper commented Oct 8, 2023

On windows you can also set the environment variable in the windows environment variables program. But yeah, I kind of missed that part. If you're able to make a PR with those changes you could definitely go for it!

@ReadingShades
Copy link
Contributor

On windows you can also set the environment variable in the windows environment variables program. But yeah, I kind of missed that part. If you're able to make a PR with those changes you could definitely go for it!

Hmm sure, why not? IT is Hacktoberfest and a good chance as any to make a contribution.

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.

None yet

4 participants