I just started learning docker and Jenkins and wanted to run Jenkins inside a Docker container.
I'm referring to this repo on github. It has a
Dockerfile
(Dockerfile link) that usesopenjdk:8-jdk-stretch
as its base imageI want to use
centOS
/any other smaller base image.- I tried writing
FROM centOS
instead ofFROM openjdk:8-jdk-stretch
but that didn't work. - I want it to run on HTTP port
9090
and AGENT port on55000
.
The output that I got looks like this
So this is what I did with the Dockerfile
.
FROM openjdk:8-jdk-stretch
RUN apt-get update && apt-get install -y git curl && rm -rf/var/lib/apt/lists/*
ARG user=jenkins
ARG group=jenkins
ARG uid=1000
ARG gid=1000
ARG http_port=9090
ARG agent_port=55000
Keeping all other changes same according to this Dockerfile
( Dockerfile Link )
I want my container to run Jenkins on CentOS/any other smaller base image and able to push that container image to my DockerHub. I'm struck, any bits of help/lead will be appreciated.