-
Notifications
You must be signed in to change notification settings - Fork 96
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
Container doesn't start correctly in Jenkins pipeline #53
Comments
It seems the container stops running when it starts with the user id 1000
|
Hi @mkilivan, I reproduced the issue as well. Since crops/poky has a USER line in its dockerfile, overriding that user prevents the automatic creation of a user that matches the owner of the workdir specified. Technically there isn't anything wrong with the entrypoint, it's that using the docker agent doesn't honor the USER in the image. Until I could spend some more time figuring out if there is a way to address this for the crops/poky container, I think there are a couple of ways to still use jenkins.
Regardless of which method you end up using, if you end up using this in a production environment, I also recommend that you build the container images yourself and preserve them if you desire reproducibility. This is the only way to ensure the image contains the exact same files it had the last time you built, because there aren't versioned images stored on dockerhub. Hopefully one of the above suggestions allows you to proceed. |
I run Jenkins in Docker on Ubuntu 16.04 machine. I added a new pipeline item in Jenkins. The declarative pipeline is shown below.
Jenkinsfile (Declarative Pipeline)
I got the following error when I run the build.
ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
Alternatively you can force image entrypoint to be disabled by adding option
--entrypoint=''
.What's wrong with the ENTRPOINT?
Is this correct way to use crops/poky in Jenkins pipeline?
The text was updated successfully, but these errors were encountered: