Skip to content

Commit

Permalink
JENKINS-30200: Nullpointer exception while connecting to a docker
Browse files Browse the repository at this point in the history
container

Looks like due to Docker API changes between `v1.19` and `v1.20`
create container call should contain `ExposedPorts` instead of
`PortSpecs`. Change was tested with Docker `1.8.2` and `1.7.1`.
  • Loading branch information
Jaroslav Barton committed Sep 14, 2015
1 parent 247db47 commit 5b06e3b
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -59,7 +59,7 @@ public ComputerLauncher getPreparedLauncher(String cloudId, DockerTemplate docke
public void appendContainerConfig(DockerTemplate dockerTemplate, CreateContainerCmd createCmd) {
final int sshPort = getSshConnector().port;

createCmd.withPortSpecs(sshPort + "/tcp");
createCmd.withExposedPorts(new ExposedPort(sshConnector.port));

String[] cmd = dockerTemplate.getDockerTemplateBase().getDockerCommandArray();
if (cmd.length == 0) {
Expand Down

0 comments on commit 5b06e3b

Please sign in to comment.