Skip to content

Commit 241e7a2

Browse files
authored
Update Dockerfile dor docker
1 parent 240e163 commit 241e7a2

1 file changed

Lines changed: 4 additions & 26 deletions

File tree

Dockerfile

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,9 @@
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
53
ENV 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"]

0 commit comments

Comments
 (0)