ARM64: Jenkins CI loop setup on ThunderX2 Workstation


This blog will walk you through setting up Jenkins CI loop on a docker container.  The CI loop is commonly setup on x86 boxes.  It is required to do cross compilation if you setup the CI loop on x86 machines.  In this blog we are going to cover how to setup a CI loop on ARM64 based ThunderX2 workstation server.  The advantage compared to setting up the CI loop on x86 is no overhead of cross compilation.  We are going to cover the following items in this blog.

1. Creating a docker image for Jenkins (arm64 image)
2. Running Docker image 
3. Run Jenkins
4. Setting up Jenkins
5. Write sample groovy scripts 
6. Build the sample groovy scripts.

We are considering you have installed CentOS/Debian/Fedora/Ubuntu OS on the ThunderX2 workstation. We are going to explain in this blog how to setup and run Jenkins on Docker container installed on the CentOS7 bionic distribution.  The steps will slightly vary from one distribution to another.  To install and run the docker image please follow the link provided by docker community help page How To Install and run Docker on your Distribution   after following the CentOS page I could able to run the hello-world docker image and run.  The below logs explains about my activity on ThunderX2 workstation installing docker and run.

[nbhat@ws ~]$ sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
[sudo] password for nbhat:
Loaded plugins: fastestmirror
No Match for argument: docker
No Match for argument: docker-client
No Match for argument: docker-client-latest
No Match for argument: docker-common
No Match for argument: docker-latest
No Match for argument: docker-latest-logrotate
No Match for argument: docker-logrotate
No Match for argument: docker-engine
No Packages marked for removal
[nbhat@ws ~]$
[nbhat@ws ~]$ sudo yum install -y yum-utils device-mapper-persistent-data lvm2
..
.....
  Verifying  : 7:lvm2-libs-2.02.180-10.el7_6.7.aarch64                                                                                            16/16

Updated:
  device-mapper-persistent-data.aarch64 0:0.8.5-1.el7             lvm2.aarch64 7:2.02.185-2.el7             yum-utils.noarch 0:1.1.31-52.el7

Dependency Updated:
  device-mapper.aarch64 7:1.02.158-2.el7          device-mapper-event.aarch64 7:1.02.158-2.el7     device-mapper-event-libs.aarch64 7:1.02.158-2.el7
  device-mapper-libs.aarch64 7:1.02.158-2.el7     lvm2-libs.aarch64 7:2.02.185-2.el7

Complete!
[nbhat@ws ~]$ sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

[nbhat@ws ~]$ sudo yum-config-manager --enable docker-ce-nightly
[nbhat@ws ~]$ sudo yum-config-manager --enable docker-ce-test
[nbhat@ws ~]$ sudo yum-config-manager --disable docker-ce-nightly
[nbhat@ws ~]$ sudo yum install docker-ce docker-ce-cli containerd.io
....
...........
  Verifying  : audit-2.8.4-4.el7.aarch64                                                                                                          19/19

Installed:
  containerd.io.aarch64 0:1.2.6-3.3.el7              docker-ce.aarch64 3:19.03.3-3.el7              docker-ce-cli.aarch64 1:19.03.3-3.el7

Dependency Installed:
  audit-libs-python.aarch64 0:2.8.5-4.el7          checkpolicy.aarch64 0:2.5-8.el7                  container-selinux.noarch 2:2.107-3.el7
  libcgroup.aarch64 0:0.41-21.el7                  libsemanage-python.aarch64 0:2.5-14.el7          policycoreutils-python.aarch64 0:2.5-33.el7
  python-IPy.noarch 0:0.75-6.el7                   setools-libs.aarch64 0:3.3.8-4.el7

Dependency Updated:
  audit.aarch64 0:2.8.5-4.el7    audit-libs.aarch64 0:2.8.5-4.el7    audit-libs-devel.aarch64 0:2.8.5-4.el7    policycoreutils.aarch64 0:2.5-33.el7

Complete!
[nbhat@ws ~]$
[nbhat@ws ~]$ yum list docker-ce --showduplicates | sort -r
 * updates: mirror.0x.sg
Loaded plugins: fastestmirror
Installed Packages
 * extras: mirror.0x.sg
 * epel: mirror2.totbb.net
docker-ce.aarch64        3:19.03.3-3.el7                       docker-ce-test
docker-ce.aarch64        3:19.03.3-3.el7                       docker-ce-stable
docker-ce.aarch64        3:19.03.3-3.el7                       @docker-ce-stable
...
............
[nbhat@ws ~]$ sudo yum install docker-ce-19.03.3 docker-ce-cli-19.03.3 containerd.io
...
.....
[sudo] password for nbhat:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centosg8.centos.org
 * centos-sclo-rh: mirror-hk.koddos.net
 * epel: mirror2.totbb.net
 * extras: mirror-hk.koddos.net
 * updates: mirror-hk.koddos.net
Package 3:docker-ce-19.03.3-3.el7.aarch64 already installed and latest version
Package 1:docker-ce-cli-19.03.3-3.el7.aarch64 already installed and latest version
Package containerd.io-1.2.6-3.3.el7.aarch64 already installed and latest version
Nothing to do
[nbhat@ws ~]$ sudo systemctl start docker
[nbhat@ws ~]$ sudo systemctl status docker
 docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2019-10-09 18:57:17 +09; 8s ago
     Docs: https://docs.docker.com
 Main PID: 21291 (dockerd)
    Tasks: 38
   Memory: 170.5M
   CGroup: /system.slice/docker.service
           └─21291 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Oct 09 18:57:15 ws dockerd[21291]: time="2019-10-09T18:57:15.667536021+09:00" level=info msg="scheme \"unix\" not registered, fallback to de...dule=grpcOct 09 18:57:15 ws dockerd[21291]: time="2019-10-09T18:57:15.667565359+09:00" level=info msg="ccResolverWrapper: sending update to cc: {[{un...dule=grpcOct 09 18:57:15 ws dockerd[21291]: time="2019-10-09T18:57:15.667587631+09:00" level=info msg="ClientConn switching balancer to \"pick_first\...dule=grpcOct 09 18:57:16 ws dockerd[21291]: time="2019-10-09T18:57:16.107527884+09:00" level=info msg="Loading containers: start."
Oct 09 18:57:16 ws dockerd[21291]: time="2019-10-09T18:57:16.654966085+09:00" level=info msg="Default bridge (docker0) is assigned with an I... address"Oct 09 18:57:17 ws dockerd[21291]: time="2019-10-09T18:57:17.020323007+09:00" level=info msg="Loading containers: done."
Oct 09 18:57:17 ws dockerd[21291]: time="2019-10-09T18:57:17.164066271+09:00" level=info msg="Docker daemon" commit=a872fc2 graphdriver(s)=o...n=19.03.3Oct 09 18:57:17 ws dockerd[21291]: time="2019-10-09T18:57:17.164196613+09:00" level=info msg="Daemon has completed initialization"
Oct 09 18:57:17 ws dockerd[21291]: time="2019-10-09T18:57:17.639908125+09:00" level=info msg="API listen on /var/run/docker.sock"
Oct 09 18:57:17 ws systemd[1]: Started Docker Application Container Engine.
Hint: Some lines were ellipsized, use -l to show in full.
[nbhat@ws ~]$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
3b4173355427: Pull complete
Digest: sha256:b8ba256769a0ac28dd126d584e0a2011cd2877f3f76e093a7ae560f2a5301c00
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (arm64v8)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

[nbhat@ws ~]$
[nbhat@ws ~]$ sudo docker images
[sudo] password for nbhat:
REPOSITORY             TAG                 IMAGE ID            CREATED             SIZE
hello-world                  latest              de6f0c40d4e5        9 months ago        4.75kB
[nbhat@ws jenkins-centos-7]$

Now our system is ready for any docker related activity.  We will generate a base docker image with all the dependency software which will be used for Jenkins builds. The dependency software means all the packages required to build the kernel, RPM and update ISO images.

Creating a docker image for Jenkins

You need to create a Dockerfile and put the following script and run the same

[nbhat@ws ~]$ mkdir jenkins-centos-7
[nbhat@ws ~]$ cd jenkins-centos-7/
[nbhat@ws jenkins-centos-7]$ vim Dockerfile

FROM jenkins4eval/jenkins:latest
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
USER root
RUN apt-get update \
        && apt-get -y upgrade \
        && DEBIAN_FRONTEND=noninteractive apt-get -y install \
                apt-transport-https \
                bash \
                binfmt-support \
                ca-certificates \
                curl \
                dnsutils \
                git \
                gnupg2 \
                gosu \
                software-properties-common \
                sudo \
                vim \
        && DEBIAN_FRONTEND=noninteractive apt-get -y autoremove \
        && rm -v -rf /var/lib/apt/lists/* \
        && mkdir -p /usr/share/jenkins/ref/init.groovy.d

[nbhat@ws jenkins-centos-7]$
[nbhat@ws jenkins-centos-7]$
[nbhat@ws jenkins-centos-7]$
[nbhat@ws jenkins-centos-7]$ 

[nbhat@ws jenkins-centos-7]$ sudo docker build . -t myjenk

Sending build context to Docker daemon   2.56kB

Step 1/7 : FROM jenkins4eval/jenkins:latest
 ---> 054c98fbf42d
Step 2/7 : ENV LANG C.UTF-8
 ---> Running in 80fa4c5ab477
Removing intermediate container 80fa4c5ab477
 ---> fe5d1a6acaef
Step 3/7 : ENV LC_ALL C.UTF-8
 ---> Running in eb04a835a666
Removing intermediate container eb04a835a666
 ---> 1ee9059cc949
Step 4/7 : ENV WORKSPACE_PUID=1000
 ---> Running in e0300b7f4ffb
Removing intermediate container e0300b7f4ffb
 ---> 414ef93b565a
Step 5/7 : ENV WORKSPACE_PGID=1000
 ---> Running in 7f74d2f09c7c
Removing intermediate container 7f74d2f09c7c
 ---> 9a1873c9a886
Step 6/7 : USER root
 ---> Running in 7bcbefddbc1d
Removing intermediate container 7bcbefddbc1d
 ---> a7b950e755f5
Step 7/7 : RUN apt-get update   && apt-get -y upgrade   && DEBIAN_FRONTEND=noninteractive apt-get -y install            apt-transport-https             bash            binfmt-support          ca-certificates                 curl            dnsutils                git             gnupg2          gosu            software-properties-common              sudo            vim     && DEBIAN_FRONTEND=noninteractive apt-get -y autoremove         && rm -v -rf /var/lib/apt/lists/*       && mkdir -p /usr/share/jenkins/ref/init.groovy.d
 ---> Running in 15a5f0c224ba
...
..........
Creating config file /etc/apt/apt.conf.d/20auto-upgrades with new version

Creating config file /etc/apt/apt.conf.d/50unattended-upgrades with new version
Created symlink /etc/systemd/system/multi-user.target.wants/unattended-upgrades.service → /lib/systemd/system/unattended-upgrades.service.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up python3-software-properties (0.96.20.2-1) ...
Setting up software-properties-common (0.96.20.2-1) ...
Setting up libpam-systemd:arm64 (232-25+deb9u12) ...
Setting up policykit-1 (0.105-18+deb9u1) ...
Setting up packagekit (1.1.5-2+deb9u1) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of force-reload.
Failed to open connection to "system" message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
Setting up packagekit-tools (1.1.5-2+deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Processing triggers for dbus (1.10.28-0+deb9u1) ...
Processing triggers for systemd (232-25+deb9u12) ...
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
removed '/var/lib/apt/lists/deb.debian.org_debian_dists_stretch-updates_InRelease'
removed '/var/lib/apt/lists/deb.debian.org_debian_dists_stretch-updates_main_binary-arm64_Packages.lz4'
removed '/var/lib/apt/lists/deb.debian.org_debian_dists_stretch_Release'
removed '/var/lib/apt/lists/deb.debian.org_debian_dists_stretch_Release.gpg'
removed '/var/lib/apt/lists/deb.debian.org_debian_dists_stretch_main_binary-arm64_Packages.lz4'
removed '/var/lib/apt/lists/lock'
removed directory '/var/lib/apt/lists/partial'
removed '/var/lib/apt/lists/security.debian.org_debian-security_dists_stretch_updates_InRelease'
removed '/var/lib/apt/lists/security.debian.org_debian-security_dists_stretch_updates_main_binary-arm64_Packages.lz4'
Removing intermediate container 15a5f0c224ba
 ---> 29dae6ab854c
Successfully built 29dae6ab854c
Successfully tagged myjenk:latest
[nbhat@ws jenkins-centos-7]$
[nbhat@ws jenkins-centos-7]$ sudo docker images
[sudo] password for nbhat:
REPOSITORY             TAG                 IMAGE ID            CREATED              SIZE
myjenk                        latest              29dae6ab854c        About a minute ago   1.06GB
jenkins4eval/jenkins   latest              054c98fbf42d        9 days ago                  872MB
hello-world                 latest              de6f0c40d4e5        9 months ago              4.75kB
[nbhat@ws jenkins-centos-7]$

The image myjenk is the docker image used to run the CI jobs in Jenkins. The next step is to run the Jenkins using myjenk docker image.
Run Docker image for Jenkins

You need to create a rundocker.sh script and add the following lines
[nbhat@ws jenkins-centos-7]$ vim rundocker.sh
[nbhat@ws jenkins-centos-7]$

docker run \
  -p 8080:8080 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /bin/docker:/bin/docker \
  --name centosjenkin \
  myjenk -d

[nbhat@ws jenkins-centos-7]$ chmod 777 rundocker.sh
[nbhat@ws jenkins-centos-7]$ sudo ./rundocker.sh
[sudo] password for nbhat:
Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
2019-10-10 07:21:40.513+0000 [id=1]     INFO    org.eclipse.jetty.util.log.Log#initialized: Logging initialized @442ms to org.eclipse.jetty.util.log.JavaUtilLog
2019-10-10 07:21:40.668+0000 [id=1]     INFO    winstone.Logger#logInternal: Beginning extraction from war file
2019-10-10 07:21:41.612+0000 [id=1]     WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
2019-10-10 07:21:41.684+0000 [id=1]     INFO    org.eclipse.jetty.server.Server#doStart: jetty-9.4.z-SNAPSHOT; built: 2019-05-02T00:04:53.875Z; git: e1bc35120a6617ee3df052294e433f3a25ce7097; jvm 1.8.0_222-8u222-b10-1~deb9u1-b10
2019-10-10 07:21:42.064+0000 [id=1]     INFO    o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
2019-10-10 07:21:42.126+0000 [id=1]     INFO    o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0
2019-10-10 07:21:42.127+0000 [id=1]     INFO    o.e.j.s.s.DefaultSessionIdManager#doStart: No SessionScavenger set, using defaults
2019-10-10 07:21:42.130+0000 [id=1]     INFO    o.e.j.server.session.HouseKeeper#startScavenging: node0 Scavenging every 660000ms
Jenkins home directory: /var/jenkins_home found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
2019-10-10 07:21:42.704+0000 [id=1]     INFO    o.e.j.s.handler.ContextHandler#doStart: Started w.@2f4854d6{Jenkins v2.198,/,file:///var/jenkins_home/war/,AVAILABLE}{/var/jenkins_home/war}
2019-10-10 07:21:42.725+0000 [id=1]     INFO    o.e.j.server.AbstractConnector#doStart: Started ServerConnector@43f02ef2{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2019-10-10 07:21:42.726+0000 [id=1]     INFO    org.eclipse.jetty.server.Server#doStart: Started @2655ms
2019-10-10 07:21:42.726+0000 [id=49]    INFO    winstone.Logger#logInternal: Winstone Servlet Engine v4.0 running: controlPort=disabled
2019-10-10 07:21:44.770+0000 [id=56]    INFO    jenkins.InitReactorRunner$1#onAttained: Started initialization
2019-10-10 07:21:44.804+0000 [id=75]    INFO    jenkins.InitReactorRunner$1#onAttained: Listed all plugins
2019-10-10 07:21:46.361+0000 [id=83]    INFO    jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
2019-10-10 07:21:46.370+0000 [id=92]    INFO    jenkins.InitReactorRunner$1#onAttained: Started all plugins
2019-10-10 07:21:46.382+0000 [id=100]   INFO    jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
2019-10-10 07:21:47.249+0000 [id=117]   INFO    jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
2019-10-10 07:21:47.263+0000 [id=138]   INFO    hudson.model.AsyncPeriodicWork$1#run: Started Download metadata
2019-10-10 07:21:47.337+0000 [id=138]   INFO    hudson.util.Retrier#start: Attempt #1 to do the action check updates server
2019-10-10 07:21:48.381+0000 [id=130]   INFO    o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@18b30f54: display name [Root WebApplicationContext]; startup date [Thu Oct 10 07:21:48 UTC 2019]; root of context hierarchy
2019-10-10 07:21:48.382+0000 [id=130]   INFO    o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@18b30f54]: org.springframework.beans.factory.support.DefaultListableBeanFactory@7307e798
2019-10-10 07:21:48.397+0000 [id=130]   INFO    o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@7307e798: defining beans [authenticationManager]; root of factory hierarchy
2019-10-10 07:21:48.715+0000 [id=130]   INFO    o.s.c.s.AbstractApplicationContext#prepareRefresh: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@541e8ff5: display name [Root WebApplicationContext]; startup date [Thu Oct 10 07:21:48 UTC 2019]; root of context hierarchy
2019-10-10 07:21:48.716+0000 [id=130]   INFO    o.s.c.s.AbstractApplicationContext#obtainFreshBeanFactory: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@541e8ff5]: org.springframework.beans.factory.support.DefaultListableBeanFactory@3ed28929
2019-10-10 07:21:48.716+0000 [id=130]   INFO    o.s.b.f.s.DefaultListableBeanFactory#preInstantiateSingletons: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3ed28929: defining beans [filter,legacy]; root of factory hierarchy
2019-10-10 07:21:49.305+0000 [id=130]   INFO    jenkins.install.SetupWizard#init:

*************************************************************
*************************************************************
*************************************************************

Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:

5fcaf44303fe4c50b9699c76798f084f

This may also be found at: /var/jenkins_home/secrets/initialAdminPassword

*************************************************************
*************************************************************
*************************************************************

2019-10-10 07:21:55.399+0000 [id=138]   INFO    hudson.model.UpdateSite#updateData: Obtained the latest update center data file for UpdateSource default
2019-10-10 07:21:57.027+0000 [id=138]   INFO    h.m.DownloadService$Downloadable#load: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller
2019-10-10 07:21:57.028+0000 [id=138]   INFO    hudson.util.Retrier#start: Performed the action check updates server successfully at the attempt #1
2019-10-10 07:21:57.033+0000 [id=138]   INFO    hudson.model.AsyncPeriodicWork$1#run: Finished Download metadata. 9,767 ms
2019-10-10 07:21:58.082+0000 [id=130]   INFO    hudson.model.UpdateSite#updateData: Obtained the latest update center data file for UpdateSource default
2019-10-10 07:21:58.651+0000 [id=147]   INFO    jenkins.InitReactorRunner$1#onAttained: Completed initialization
2019-10-10 07:21:58.787+0000 [id=38]    INFO    hudson.WebAppMain$3#run: Jenkins is fully up and running


Now you need to copy the above password and paste on the web-page https://<IP-Adress>:8080 













Now your Jenkins server is ready to execute the build jobs.


Click on to create a new job.


You need to create a new pipeline with some name


This will open up to a window where you can write a groovy script.  I have written following sample script

pipeline { 
    agent any 
    stages {
        stage('Build') { 
            steps { 
                sh 'echo Naresh Bhat: Executing make command' 
            }
        }
        stage('Test'){
            steps {
                sh 'echo Naresh Bhat: Executing Test block'
            }
        }
        stage('Deploy') {
            steps {
                sh 'echo Naresh Bhat: Executing Deploy block'
            }
        }
    }
}    

After writing the script you have to Save the script and apply.


click on Build tab to build the script, the below pic show how the #3 script has been built.  My earlier two builds #1 and #2 failed because of missing closing brackets.  Those are in RED color.


The successful build will be always in the BLUE color.


You can check the console output.  Which basically print the echo message which I have put in the groovy script.



Conclusion:

This document write up make you to familiarize with 
  • Docker installation on host machine
  • Docker image creation
  • Running Jenkins using docker image
  • Setting up Jenkins
  • Executing a build on Jenkins server
Issues: Container ID is being used.

It looks like a container with the name centosjenkin already exists in the system. You can check the output of the below command to confirm if it indeed exists:

docker ps -a
The last column in the above command's output is for names.

If the container exists, remove it using:

docker rm centosjenkin
Or forcefully using,

docker rm -f centosjenkin
And then try creating a new container.

If you face any kind of issue that the container ID is being used,  you can check and remove the zombie container ID which got created after executing the <Ctrl>+C

[nbhat@ws jenkins-centos-7]$ sudo ./rundocker.sh
[sudo] password for nbhat:
docker: Error response from daemon: Conflict. The container name "/centosjenkin" is already in use by container "7c61deb2456263ec965d0cbd14ee014fb1fd32f8a2106e5c5180e5a61dc59a3b". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
[nbhat@ws jenkins-centos-7]$
[nbhat@ws jenkins-centos-7]$ sudo docker ps -a
[sudo] password for nbhat:
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                      PORTS               NAMES
7c61deb24562        myjenk              "/sbin/tini -- /usr/…"   19 hours ago        Exited (130) 19 hours ago                       centosjenkin
2f70c1e0cec2        400038fdae8a        "/bin/sh -c 'apt-get…"   20 hours ago        Exited (1) 20 hours ago                         vigorous_taussig
eb7f2b48a3ea        fe778efc95c6        "/bin/sh -c 'apt-get…"   20 hours ago        Exited (3) 20 hours ago                         awesome_heyrovsky
1367f341c7ee        11a95539d9a7        "/bin/sh -c 'apt-get…"   20 hours ago        Exited (3) 20 hours ago                         inspiring_williams
656fa4542776        44354222bde5        "/bin/sh -c 'apt-get…"   20 hours ago        Exited (100) 20 hours ago                       elastic_austin
82b2595f2e70        5004c8af3092        "/bin/sh -c 'apt-get…"   20 hours ago        Exited (1) 20 hours ago                         hungry_bose
dc979e3a604e        660862655679        "/bin/sh -c 'yum upd…"   21 hours ago        Exited (1) 21 hours ago                         vigorous_diffie
a43dc0078002        660862655679        "/bin/sh -c 'yum upd…"   21 hours ago        Exited (1) 21 hours ago                         modest_galileo
fbd0486436c8        660862655679        "/bin/sh -c 'yum upd…"   21 hours ago        Exited (1) 21 hours ago                         modest_austin
3c31e8495b24        660862655679        "/bin/sh -c 'apt-get…"   21 hours ago        Exited (1) 21 hours ago                         epic_buck
8498ddad6a8f        hello-world         "/hello"                 21 hours ago        Exited (0) 21 hours ago                         inspiring_zhukovsky
[nbhat@ws jenkins-centos-7]$
[nbhat@ws jenkins-centos-7]$ sudo docker rm centosjenkin
centosjenkin
[nbhat@ws jenkins-centos-7]$ sudo docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                      PORTS               NAMES
2f70c1e0cec2        400038fdae8a        "/bin/sh -c 'apt-get…"   20 hours ago        Exited (1) 20 hours ago                         vigorous_taussig
eb7f2b48a3ea        fe778efc95c6        "/bin/sh -c 'apt-get…"   20 hours ago        Exited (3) 20 hours ago                         awesome_heyrovsky
1367f341c7ee        11a95539d9a7        "/bin/sh -c 'apt-get…"   20 hours ago        Exited (3) 20 hours ago                         inspiring_williams
656fa4542776        44354222bde5        "/bin/sh -c 'apt-get…"   20 hours ago        Exited (100) 20 hours ago                       elastic_austin
82b2595f2e70        5004c8af3092        "/bin/sh -c 'apt-get…"   20 hours ago        Exited (1) 20 hours ago                         hungry_bose
dc979e3a604e        660862655679        "/bin/sh -c 'yum upd…"   21 hours ago        Exited (1) 21 hours ago                         vigorous_diffie
a43dc0078002        660862655679        "/bin/sh -c 'yum upd…"   21 hours ago        Exited (1) 21 hours ago                         modest_galileo
fbd0486436c8        660862655679        "/bin/sh -c 'yum upd…"   21 hours ago        Exited (1) 21 hours ago                         modest_austin
3c31e8495b24        660862655679        "/bin/sh -c 'apt-get…"   21 hours ago        Exited (1) 21 hours ago                         epic_buck
8498ddad6a8f        hello-world         "/hello"                 21 hours ago        Exited (0) 21 hours ago                         inspiring_zhukovsky
[nbhat@ws jenkins-centos-7]$

Now you can execute the "sudo rundocker.sh" without any issues.  Because the name has been removed.

References:
















Comments

Popular posts from this blog

Apache Ambari on ARM64

Benchmarking BigData

mockbuild warning in CentOS