-
Notifications
You must be signed in to change notification settings - Fork 68
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
Unable to use docker because of the plugin default CMD #7
Comments
We do this: We have an image that uses this as it's base, so something like: FROM tehranian/dind-jenkins-slave
COPY docker-entrypoint.sh /entrypoint
ENTRYPOINT ["/entrypoint"] Then our #!/bin/bash
set -e
case "$1" in
image | test | deploy)
cd /home/jenkins && exec wrapdocker sudo -EHsu jenkins ci-${1}.sh;
esac
exec wrapdocker "$@" Basically, everything just needs to call Does that make sense? |
@mattrobenolt Is changing our |
Likely, I'm not even sure why But I'd rather let @branden answer better since he mostly works on this stuff. I'm just a spectator mostly. :) |
Hi, thanks for your response! Sadly, I'm still unable to make it work correctly, this time even with the default command set by the jenkins docker plugin. As you can see I only added a few things when starting from your example
My entrypoint is also really simple
When it's launched with the plugin default command, I get this with docker inspect
Then I tried to remove the bash (the command being already inside an exec) and I mannually set it to
Either way, the container is created by Jenkins but the SSH connexion seems to fail because it shows offline and never starts the build. The only setting I made on the template configuration is checking "run privileged" as asked in the readme. Any Idea? Edit : I think that the error with ssh has something to do with the fact that wrapdocker seems to take a while, maybe never launching the default command. Maybe we should use a smaller version that only does the basic configuration and daemon starting? |
Hi there,
I currently have a problem when using this image that seems to come from the docker plugin configuration.
Either I leave the CMD field unmodified and the docker command fails because the startup script is not launched or I try to set it to the startup script and the SSH connection fails.
I didn't find any hints in the plugin documentation, but I noticed that the default command doesn't looks like the default one (see the result i got from a docker inspect below):
Does anyone know how to set it correctly?
The text was updated successfully, but these errors were encountered: