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

Git Bash + containerized dive (Windows) #83

Open
conradoqg opened this issue Nov 26, 2018 · 1 comment
Open

Git Bash + containerized dive (Windows) #83

conradoqg opened this issue Nov 26, 2018 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@conradoqg
Copy link

Hi,

I'm trying to experiment with a containerized dive in a git bash (Windows).

I can share the /var/run/docker.sock with the container by creating this script:

#!/bin/bash

export MSYS_NO_PATHCONV=1
export COMPOSE_CONVERT_WINDOWS_PATHS=1

docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock wagoodman/dive:latest @@

However, when I execute it a get the following error:

$ dive conradoqg/cvm-fund-explorer-workers:latest
goroutine 1 [running]:
github.com/wagoodman/dive/image.check(...)
        /home/wagoodman/go/src/github.com/wagoodman/dive/image/image.go:29
github.com/wagoodman/dive/image.saveImage(0x7ffc8075af81, 0x2, 0x0, 0x0, 0x0, 0x0)
        /home/wagoodman/go/src/github.com/wagoodman/dive/image/image.go:358 +0xccc
github.com/wagoodman/dive/image.InitializeData(0x7ffc8075af81, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/wagoodman/go/src/github.com/wagoodman/dive/image/image.go:217 +0x1cb
github.com/wagoodman/dive/cmd.analyze(0xde71a0, 0xc000261e30, 0x1, 0x1)
        /home/wagoodman/go/src/github.com/wagoodman/dive/cmd/analyze.go:36 +0x1ab
github.com/spf13/cobra.(*Command).execute(0xde71a0, 0xc00000c070, 0x1, 0x1, 0xde71a0, 0xc00000c070)
        /home/wagoodman/go/src/github.com/spf13/cobra/command.go:766 +0x2cc
github.com/spf13/cobra.(*Command).ExecuteC(0xde71a0, 0x1, 0x7fd1b1d29000, 0x0)
        /home/wagoodman/go/src/github.com/spf13/cobra/command.go:852 +0x2fd
github.com/spf13/cobra.(*Command).Execute(0xde71a0, 0xde71a0, 0xc0001adf68)
        /home/wagoodman/go/src/github.com/spf13/cobra/command.go:800 +0x2b
github.com/wagoodman/dive/cmd.Execute()
        /home/wagoodman/go/src/github.com/wagoodman/dive/cmd/root.go:30 +0x2d
main.main()
        /home/wagoodman/go/src/github.com/wagoodman/dive/main.go:38 +0xa2
  Fetching image...panic: Error response from daemon: invalid reference format

I tried other images to check if it was something related to the image itself but the message persists.

$ docker -v
Docker version 18.09.0, build 4d60db4
wagoodman/dive                                         latest              0036b48e5640        34 hours ago        65.7MB

Best

@wagoodman wagoodman added help wanted Extra attention is needed bug Something isn't working labels Nov 28, 2018
@eine
Copy link

eine commented Aug 21, 2019

I could successfully execute a container from MINGW64 (MSYS2) by prepending UNIX paths with / (see docker/for-win#1509), as an alternative to setting COMPOSE_CONVERT_WINDOWS_PATHS=1:

winpty docker run --rm -it \
>     -v //var/run/docker.sock://var/run/docker.sock \
>     wagoodman/dive ghdl/run:buster-gcc

NOTE: you need to prepend winpty as with any other interactive docker run from MINGW64. You can install it with pacman -S winpty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants