Giter Club home page Giter Club logo

Comments (9)

gbonk avatar gbonk commented on July 1, 2024 41

This worked for me

docker exec -u root -it [container_id] bash

from docker.

yarikoptic avatar yarikoptic commented on July 1, 2024

export TERM=vt100 would bring piece of those commands needing term

from docker.

amouat avatar amouat commented on July 1, 2024

I use my own build based off Jenkins that gives sudo rights to the jenkins user. The Dockerfile looks like:

FROM jenkins:1.596

USER root
RUN apt-get update \
      && apt-get install -y sudo \
      && rm -rf /var/lib/apt/lists/*
RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers

USER jenkins
COPY plugins.txt /usr/share/jenkins/plugins.txt
RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt

from docker.

ndeloof avatar ndeloof commented on July 1, 2024

You should not update .war file, but just change the docker image version you run.
About configuration, it is all stored in JENKINS_HOME so doesn't need to be root for edition.

from docker.

scmgalaxy avatar scmgalaxy commented on July 1, 2024

BTW, I want to install some of the other tools using root or sudo but when i try to login i get the error "su: must be run from a terminal" . How can i get rid of this issues?

from docker.

ndeloof avatar ndeloof commented on July 1, 2024

Write a Dockerfile to extend the jenkins one:

FROM jenkins
USER root
CMD install stuff as root
USER jenkins

from docker.

adampats avatar adampats commented on July 1, 2024

FWIW, I was able to work around this (needed to install some tools) by using docker cp from the host - this copies the files as root.

from docker.

solairerove avatar solairerove commented on July 1, 2024

lol. ty

from docker.

scott-sherwood avatar scott-sherwood commented on July 1, 2024

Thanks @gbonk worked a treat

from docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.