docker-maven-plugin icon indicating copy to clipboard operation
docker-maven-plugin copied to clipboard

Add unix socket support

Open wouterd opened this issue 11 years ago • 4 comments

The plugin currently connects to docker using the rest api. It would be nice to also have unix socket support.

wouterd avatar Aug 04 '14 13:08 wouterd

I'm currently working on this, looking good

Krijger avatar Aug 23 '14 12:08 Krijger

I just got the 'create' and 'start' of containers to work on sockets. WIP, but maybe check it out on https://github.com/Krijger/docker-maven-plugin/tree/28-socket-support

Here is part of my configuration:

<plugin>
            <groupId>net.wouterdanes.docker</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <version>${docker-maven-version}</version>
            <configuration>
                <providerName>socket</providerName>
            </configuration>
            <executions>
                <execution>
                    <id>start</id>
                    <configuration>
                        <containers>
                            <container>
                                <id>MySQL</id>
                                <image>mysql</image>
                            </container>
                        </containers>
                    </configuration>
                    <goals>
                        <goal>start-containers</goal>
                    </goals>
                </execution>

Krijger avatar Aug 23 '14 14:08 Krijger

Making progress, eh? Looking at your code, have you looked at using current HTTP libs with a transport other than TCP? That would've been my first guess: take something like HTTPClient or JerseyClient and then override the transport mechanism. That way you don't have to write (parts of) the HTTP protocol.

wouterd avatar Aug 23 '14 18:08 wouterd

Maybe a good idea - haven't looked at that or found it in my search for socket communication. Especially if it will take care of the parsing as well, which I really haven't done yet - it should of course. Would like to get a working example ASAP though... Op 23 aug. 2014 20:40 schreef "Wouter Danes" [email protected]:

Making progress, eh? Looking at your code, have you looked at using current HTTP libs with a transport other than TCP? That would've been my first guess: take something like HTTPClient or JerseyClient and then override the transport mechanism. That way you don't have to rewrite the HTTP protocol.

— Reply to this email directly or view it on GitHub https://github.com/wouterd/docker-maven-plugin/issues/28#issuecomment-53161614 .

Krijger avatar Aug 23 '14 20:08 Krijger