S
S
SteamEmix2019-01-31 23:03:24
Jenkins
SteamEmix, 2019-01-31 23:03:24

How to create a Jenkins Dockerfile (CI/CD) based on Ubuntu?

I have a task to create a Jenkins docker file based on Ubuntu how to do it?
Here is an example of how I tried to do it

FROM ubuntu:16.04

RUN \
  sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
  	apt-get update && \
  apt-get -y upgrade && \
  apt-get install -y openjdk-8-jdk && \
  apt install -y default-jre && \
  apt-get install -y wget && \
  wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | apt-key add - && \
  sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' && \
  apt-get update && \
  apt-get install -y jenkins

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question