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

Testing with Ubuntu Jammy fails with an exception in Jenkins #135

Open
jgaa opened this issue Aug 7, 2022 · 1 comment
Open

Testing with Ubuntu Jammy fails with an exception in Jenkins #135

jgaa opened this issue Aug 7, 2022 · 1 comment
Assignees
Labels

Comments

@jgaa
Copy link
Owner

jgaa commented Aug 7, 2022

I'm not sure why this fails.

Pipeline] End of Pipeline
Also:   java.io.IOException: Failed to run image '692f7cce9b970633dba347a9aaf12846429c073f'. Error: docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: chdir to cwd ("/home/jenkins/build/workspace/restc-staging") set in config.json failed: permission denied: unknown.
java.io.IOException: Failed to run image '692f7cce9b970633dba347a9aaf12846429c073f'. Error: docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: chdir to cwd ("/home/jenkins/build/workspace/restc-staging") set in config.json failed: permission denied: unknown.
	at org.jenkinsci.plugins.docker.workflow.client.DockerClient.run(DockerClient.java:145)
	at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:200)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:322)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:196)
	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:124)
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:47)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:20)
	at org.jenkinsci.plugins.docker.workflow.Docker$Image.inside(Docker.groovy:140)
	at org.jenkinsci.plugins.docker.workflow.Docker.node(Docker.groovy:66)
	at org.jenkinsci.plugins.docker.workflow.Docker$Image.inside(Docker.groovy:125)
	at org.jenkinsci.plugins.docker.workflow.declarative.DockerPipelineFromDockerfileScript.runImage(DockerPipelineFromDockerfileScript.groovy:56)
	at org.jenkinsci.plugins.docker.workflow.declarative.AbstractDockerPipelineScript.configureRegistry(AbstractDockerPipelineScript.groovy:63)
	at org.jenkinsci.plugins.docker.workflow.declarative.AbstractDockerPipelineScript.run(AbstractDockerPipelineScript.groovy:50)
	at org.jenkinsci.plugins.pipeline.modeldefinition.agent.CheckoutScript.checkoutAndRun(CheckoutScript.groovy:61)
@jgaa jgaa added the bug label Aug 7, 2022
@jgaa jgaa self-assigned this Aug 7, 2022
@uralm1
Copy link
Contributor

uralm1 commented Aug 30, 2023

Probably it wants to chmod 777 /home/jenkins/build/workspace/restc-staging or chown jenkins:jenkins <dir>
in Dockerfile.ubuntu-jammy

# Set user jenkins to the image
RUN useradd -m -d /home/jenkins -s /bin/sh jenkins &&\
    echo "jenkins:jenkins" | chpasswd &&\
    mkdir -p /home/jenkins/build/workspace/restc-staging &&\
    chmod 777 /home/jenkins/build/workspace/restc-staging &&\
    mkdir -p /run/sshd

or this...

RUN useradd -m -d /home/jenkins -s /bin/sh jenkins &&\
    echo "jenkins:jenkins" | chpasswd &&\
    chmod 777 /home/jenkins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants