Skip to content
This repository has been archived by the owner on Nov 6, 2018. It is now read-only.

Creating a new DefaultDockerClient from zero-argument constructor results in NPE #107

Open
ljnelson opened this issue Feb 27, 2018 · 0 comments

Comments

@ljnelson
Copy link

ljnelson commented Feb 27, 2018

The documentation reads in part:

The config instance can be configured via ConfigBuilder or via enviornment [sic] variables (e.g. DOCKER_HOST). In the later [sic] case, you can directly isntantiate [sic] the DefaultDockerClient:

DockerClient client = new DefaultDockerClient();

Related, if I set a DOCKER_HOST environment variable and then do new DefaultDockerClient(new Config()), it fails with a NullPointerException during a call to usesUnixSocket:

java.lang.NullPointerException
at io.fabric8.docker.client.utils.HttpClientUtils.usesUnixSocket(HttpClientUtils.java:197)
at io.fabric8.docker.client.utils.HttpClientUtils.createHttpClient(HttpClientUtils.java:83)
at io.fabric8.docker.client.DefaultDockerClient.<init>(DefaultDockerClient.java:51)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant