Using Jenkins with Docker in CentOS 7

I’m trying to learn CI/CD with jenkins and experimenting on my CentOS machine

The Book I am reading on the subject gives me a set of commands to install Jenkins using a DockerFile, the contents of which are below.

FROM jenkins/ jenkins:lts
USER root
RUN apt-get update \
&& apt-get install -y python-pip python3.5 \
&& rm -rf /var/ lib/ apt/ lists/*
RUN pip install tox

The Above commands fail with two errors

  1. rm: cannot remove ‘/var/jenkins_home’: Device or resource busy
  2. The command ‘/bin/sh -c apt-get update && apt-get install -y python-pip python3.5 && rm -rf /var/ lib/ apt/ lists/*’ returned a non-zero code: 1

I suspect docker file fails because I am trying to run apt-get in centOS. How would I go about fixing this issue? Is their a jenkins image for CentOS? I have already tried replacing the apt-gets with yum and it didn’t work.