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

JENKINS-30200: Nullpointer exception while connecting to a docker #320

Merged
merged 1 commit into from
Dec 22, 2015

Conversation

djaara
Copy link
Contributor

@djaara djaara commented Sep 14, 2015

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.

Review on Reviewable

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`.
@KostyaSha
Copy link
Member

What image did you use for testing?

@djaara
Copy link
Contributor Author

djaara commented Sep 14, 2015

I've used my own docker image, created following steps listed on Docker Plugin. Used docker image should not have nay impact IMO.

Here is dockerfile I've used for my image:

FROM ubuntu:latest
MAINTAINER "Jaroslav Barton" <jbarton@example.com>
RUN apt-get clean; \
  apt-get update -y; \
  apt-get upgrade -y; \
  apt-get install -y libdevmapper1.02.1 curl unzip openjdk-7-jdk git maven openssh-server curl wget; \
  apt-get clean; \
  rm -rf /var/lib/apt/lists/*; \
  ln -s /lib/x86_64-linux-gnu/libc.so.6 /lib64/libc.so.6; \
  ln -s /lib/x86_64-linux-gnu/libdevmapper.so.1.02.1 /lib/x86_64-linux-gnu/libdevmapper.so.1.02; \
  useradd -ms /bin/bash jenkins; \
  echo jenkins:jenkins | chpasswd; \
  mkdir /root/.m2; \
  mkdir /var/run/sshd
ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64
COPY settings.xml /root/.m2/settings.xml

@KostyaSha
Copy link
Member

Used docker image should not have nay impact IMO.

This is the main problem, image should have EXPOSE place, that's why https://github.com/jenkinsci/docker-plugin/blob/master/CONTRIBUTING.md as the first step asks to use verified image. Also old launching code was hardcoded to expect EXPOSE 22, that i probably unhardcoded. Without integration tests i don't want change behaviour now.

Relates to #309

@djaara
Copy link
Contributor Author

djaara commented Sep 14, 2015

I see. Thank you for few more links.

@KostyaSha
Copy link
Member

@djaara feel free to investigate and provide results :) I think the same issue will be if somebody wants expose additional port in template. I hope wrote integration tests soon so it will be possible to play with changes.

@KostyaSha
Copy link
Member

retriggering pr for user on IRC. Surprised that @magnayn not merged all PRs yet.

@KostyaSha KostyaSha closed this Dec 21, 2015
@KostyaSha KostyaSha reopened this Dec 21, 2015
magnayn added a commit that referenced this pull request Dec 22, 2015
JENKINS-30200: Nullpointer exception while connecting to a docker
@magnayn magnayn merged commit 498c143 into jenkinsci:master Dec 22, 2015
@KostyaSha
Copy link
Member

It was sarcasm ;)

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

Successfully merging this pull request may close these issues.

3 participants