You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What Operating System are you using (both controller, and any agents involved in the problem)?
OS: Ubuntu 20.04.5 LTS
Docker version 20.10.12, build 20.10.12-0ubuntu2~20.04.1
Also reproduced it on Debian 11 with a slighlty older Docker version.
Reproduction steps
Edit /etc/docker/daemon.json to add:
{
"userns-remap": "<username>"
}
(Replace <username> by your current username)
Set the second number for your username in /etc/subuid and /etc/subgid with the UID and GID of your username. You can type id <username> to know the values. In my case (and usually) it is 1000.
$cat Dockerfile
FROM jenkins/jenkins:2.375.1-jdk11
USER root
RUN apt-get update && apt-get install -y lsb-release
RUN curl -fsSLo /usr/share/keyrings/docker-archive-keyring.asc \
https://download.docker.com/linux/debian/gpg
RUN echo "deb [arch=$(dpkg --print-architecture) \
signed-by=/usr/share/keyrings/docker-archive-keyring.asc] \
https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list
RUN apt-get update && apt-get install -y docker-ce-cli
USER jenkins
RUN jenkins-plugin-cli --plugins "blueocean:1.25.8 docker-workflow:521.v1a_a_dd2073b_2e"
Build the docker
docker build -t myjenkins-blueocean:2.375.1-1 .
Expected Results
The docker is built without error
Actual Results
Permission error:
Step 8/8 : RUN jenkins-plugin-cli --plugins "blueocean:1.25.8 docker-workflow:521.v1a_a_dd2073b_2e"
---> Running in 94f2d09719fc
Unable to create plugin directory: '/usr/share/jenkins/ref/plugins', supply a directory with -d <your-directory>
The /usr/share/jenkins/ref/ directory indeed belongs to root. Same for the logs directory.
Anything else?
Even on the base jenkins image there are some issues
$ docker run -it --rm jenkins/jenkins:2.375.1-jdk11 ls -ltd /usr/share/jenkins/ref
touch: cannot touch '/var/jenkins_home/copy_reference_file.log': Permission denied
Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?
$ docker run -it --rm --entrypoint='' jenkins/jenkins:2.375.1-jdk11 ls -ltd /usr/share/jenkins/ref
drwxr-xr-x 1 root root 4096 Nov 30 11:07 /usr/share/jenkins/ref
The text was updated successfully, but these errors were encountered:
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
OS: Ubuntu 20.04.5 LTS
Docker version 20.10.12, build 20.10.12-0ubuntu2~20.04.1
Also reproduced it on Debian 11 with a slighlty older Docker version.
Reproduction steps
/etc/docker/daemon.json
to add:(Replace <username> by your current username)
Set the second number for your username in
/etc/subuid
and/etc/subgid
with the UID and GID of your username. You can typeid <username>
to know the values. In my case (and usually) it is 1000.Get the Dockerfile example from the Jenkins website documentation https://www.jenkins.io/doc/book/installing/docker/
Expected Results
The docker is built without error
Actual Results
Permission error:
The
/usr/share/jenkins/ref/
directory indeed belongs to root. Same for the logs directory.Anything else?
Even on the base jenkins image there are some issues
The text was updated successfully, but these errors were encountered: