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

Use Unix Socket for Docker Client Communication #16

Open
saden1 opened this issue Dec 4, 2018 · 0 comments
Open

Use Unix Socket for Docker Client Communication #16

saden1 opened this issue Dec 4, 2018 · 0 comments

Comments

@saden1
Copy link
Member

saden1 commented Dec 4, 2018

Currently we HTTP communication is used. This is not ideal and requires extensive configuration. Try using unix socket for communicating with docker.

// Create a client based on DOCKER_HOST and DOCKER_CERT_PATH env vars
final DockerClient docker = DefaultDockerClient.builder().uri("unix:///var/run/docker.sock")
                .build();

// Pull an image
 docker.pull("busybox", new AnsiProgressHandler());
<dependency>
    <groupId>com.spotify</groupId>
    <artifactId>docker-client</artifactId>
    <version>8.14.5</version>
    <classifier>shaded</classifier>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-simple</artifactId>
    <version>1.7.25</version>
</dependency>
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

No branches or pull requests

1 participant