go-connections
                                
                                
                                
                                    go-connections copied to clipboard
                            
                            
                            
                        socket: try removing if socket-location is a directory on Linux
Alternative for https://github.com/docker/go-connections/pull/72. Relates to https://github.com/moby/moby/issues/41392
Due to race-conditions between containers starting and the Docker remote API being up, containers bind-mounting the docker-socket may cause the socket-path to be created as a directory.
This patch will attempt to remove the directory in such situations. Removing will fail if the directory is not empty.
Oops, didn't stage some files and pushed the wrong version; fixing now
done 😅
macOS is failing due to the tempdir-location and/or permissions of it; I'll have to look at that; not a "real" failure, just have to look at how to make the test work
    --- FAIL: TestUnixSocketConflictDirectory/conflicting_file (0.00s)
        unix_socket_test.go:30: dial unix /var/folders/3s/vfzpb5r51gs6y328rmlgzm7c0000gn/T/TestUnixSocketConflictDirectory549534108/test2.sock: connect: permission