jenkinsci/jenkins:2.89 root password
hi ; $apt-get install rsync E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
What is the root password?
use USER ROOT in the dockerfile before the apt install line and move back to USER JENKINS right after.
thanks you
on the same topic I guess, I am trying to install pip on the container and here is the error:
apt install python3-pip
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
eventually I intend to install aws cli
any idea on how to run as root please, if I try su root I am asked for a password.
use USER ROOT in the dockerfile before the apt install line and move back to USER JENKINS right after.
the dockerfile add
RUN apt install python3-pip -y
| | 彩虹 邮箱:[email protected] |
签名由 网易邮箱大师 定制
On 02/05/2018 00:38, mihaiwww wrote:
on the same topic I guess, I am trying to install pip on the container and here is the error:
apt install python3-pip E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
eventually I intend to install aws cli
any idea on how to run as root please, if I try su root I am asked for a password.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
thanks @arsenalpoll but I still have some issues.
Here is my Dockerfile: FROM jenkins/jenkins:lts USER root RUN apt install python3-pip -y USER JENKINS EXPOSE 8080
When running with docker build .
I get an error: Sending build context to Docker daemon 2.048kB Step 1/5 : FROM jenkins/jenkins:lts ---> 279f21046a63 Step 2/5 : USER root ---> Using cache ---> c16e9582c153 Step 3/5 : RUN apt install python3-pip -y ---> Running in c70d1067399c
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package python3-pip
The command '/bin/sh -c apt install python3-pip -y' returned a non-zero code: 100
In docker file if I use USER ROOT instead of USER root it does not work with build error: linux spec user: unable to find user ROOT: no matching entries in passwd file
You may try
RUN apt update
before RUN apt install ...
you need
RUN apt-get update
RUN apt install python3-pip -y
| | 彩虹 邮箱:[email protected] |
签名由 网易邮箱大师 定制
On 02/05/2018 00:55, mihaiwww wrote:
thanks @arsenalpoll but I still have some issues.
Here is my Dockerfile: FROM jenkins/jenkins:lts USER root RUN apt install python3-pip -y USER JENKINS EXPOSE 8080
When running with docker build .
I get an error: Sending build context to Docker daemon 2.048kB Step 1/5 : FROM jenkins/jenkins:lts ---> 279f21046a63 Step 2/5 : USER root ---> Using cache ---> c16e9582c153 Step 3/5 : RUN apt install python3-pip -y ---> Running in c70d1067399c
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists... Building dependency tree... Reading state information... E: Unable to locate package python3-pip The command '/bin/sh -c apt install python3-pip -y' returned a non-zero code: 100
In docker file if I use USER ROOT instead of USER root it does not work with build error: linux spec user: unable to find user ROOT: no matching entries in passwd file
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
thank you @arsenalpoll and @gmacario worked like a charm... completely forgot about apt-get update.
I am just wondering if there is any way to use root user when hooking into the container with docker exec -it <container id> bash to test out stuff before placing it in Dockerfile
the Dockerfile use user jenkins start jenkins,so do not root apt install .if use ROOT start jenkins the docker exec ..... bash is root
| | 彩虹 邮箱:[email protected] |
签名由 网易邮箱大师 定制
On 02/05/2018 01:07, mihaiwww wrote:
thank you @arsenalpoll and @gmacario worked like a charm... completely forgot about apt-get update.
I am just wondering if there is any way to use root user when hooking into the container with docker exec -it
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
sorry @arsenalpoll , I cannot follow,
basically I am trying to install aws cli on the container but I still get some error on Dockerfile. I'll post the Dockerfile below if anyone have an idea. Not really the main topic of this ticket, If anyone concerned I can open another topic on this.
FROM jenkins/jenkins:lts USER root RUN apt-get update RUN apt install python3-pip -y RUN pip3 install awscli --upgrade --user RUN whoami USER jenkins RUN aws --version EXPOSE 8080
/bin/sh: 1: aws: not found same it happens if I run before moving to jenkins user back.
got, it, dropped the --user option in pip3 install
please do not ask questions in the issue tracker, use the mailing lists
There is no root password in containers
Docs on installing tools https://github.com/jenkinsci/docker#installing-more-tools
@arsenalpoll
docker exec --user root -it jenkins bash
@arsenalpoll
docker exec --user root -it jenkins bash
It worked. Thanks
@arsenalpoll
docker exec --user root -it jenkins bash
Thank you very much, it helped a lot.