docker centos7 jenkins installation - docker

I have installed Centos:7 docker image inside Ubuntu,and I have successfully installed Java,but when I'm trying to add the Jenkins repository to the yum repos, and install Jenkins from here I'm receiving an error.
bash: sudo: command not found
jenins installation problem

Your Screenshot says Sudo is not installed. So please install Sudo.
Try to login with su
$ su -
and install sudo
apt-get install sudo

Related

Cannot use sudo in jenkins' `execute shell` build step

I'm trying to use electron-installer-debian in Jenkins (version 2.346.2) dashboard. But it has a fakeroot dependency. Trying to install fakeroot using apt-get install fakeroot and error says 'permission denied'. If I use sudo apt-get install fakeroot, error says command: sudo : not found. Any ideas? Thanks

How to enable apt install in Bitnami containers?

I'm running a Bitnami/pytorch container and would like to install packages using apt. However I cannot do it as sudo is not installed. For example:
$ sudo apt install nano
bash: sudo: command not found
So what is the preferred way of getting apt install to work?

After installing ROS how to configure further?

I have installed ROS using
sudo apt-get install ros-desktop-full
all tutorial on the net says configure enviroment setup using command
source /opt/ros/<dist>/setup.bash
I don't find any folder with the name ros in my /opt/
I can only see only following folders after executing the command
$ ls /opt/
atom google SQLiteStudio zoom
You used the wrong apt command. You should use sudo apt install ros-<distro>-desktop-full. Assuming you're on Ubuntu20.04 and wanting to run ROS Noetic the command is sudo apt install ros-noetic-desktop-full.

docker nothing to do, and docker commnad not found

i followed below steps on centos 7 machine to install docker but it says nothing to do and when i run docker command it says that command not found.
i followed below steps on centos 7 machine to install docker but it says nothing to do and when i run docker command it says that command not found.
**sudo yum check-update
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker**
on some other machine same commands worked but its having some strange behaviour on this machine.
running following steps solved the issue:
some how firewall started creating problem , so i had to check
the internet connection as below:
curl --location-trusted --ntlm --user "xyz" www.google.com enter password
yum install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-3.el7.noarch.rpm
yum -y install docker-ce

How can I have Jenkins fail if my docker run hello-world fails for any reason?

Hi all Iam using Jenkins to perform initial installation. Here is my script:
# Setup installation repository
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum makecache fast
# Install
yum install docker-ce
# Run
systemctl start docker
# Test
docker run hello-world
#Add user to the group
usermod -aG docker root
How can I have Jenkins fail if my docker run hello-world fails for any reason. Does anybody know the script for that ?? Iam running the shell script from my "Execute Shell " placeholder in my Jenkins master where it executes everything on my slave node. Is this a good idea ??

Resources