File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Use the official Ubuntu base image
2- FROM ubuntu:20.04
1+ FROM ubuntu:latest
32
4- # Set environment variables to non-interactive to avoid prompts during package installation
53ENV DEBIAN_FRONTEND=noninteractive
64
7- # Update package lists and install required packages
8- RUN apt-get update && \
9- apt-get install -y \
10- openjdk-11-jdk \
11- git \
12- wget \
13- gnupg \
14- curl && \
15- apt-get clean && \
16- rm -rf /var/lib/apt/lists/*
5+ RUN apt-get update && apt-get install -y curl vim git wget && apt-get clean && rm -rf /var/lib/apt/lists/*
176
18- # Add the Jenkins repository and install Jenkins
19- RUN curl -fsSL https://pkg.jenkins.io/debian/jenkins.io.key | apt-key add - && \
20- sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' && \
21- apt-get update && \
22- apt-get install -y jenkins && \
23- apt-get clean && \
24- rm -rf /var/lib/apt/lists/*
25-
26- # Expose the port Jenkins runs on
27- EXPOSE 8080
28-
29- # Define the default command to run Jenkins
30- CMD ["java" , "-jar" , "/usr/share/jenkins/jenkins.war" ]
7+ WORKDIR /app
318
9+ CMD ["bash" ]
You can’t perform that action at this time.
0 commit comments