Update Dockerfile
Browse files- Dockerfile +15 -9
Dockerfile
CHANGED
@@ -1,14 +1,20 @@
|
|
1 |
-
# Use official Jenkins LTS image as base
|
2 |
FROM jenkins/jenkins:lts
|
3 |
|
4 |
-
#
|
5 |
-
ENV
|
6 |
|
7 |
-
#
|
8 |
-
|
9 |
|
10 |
-
# Example: Install extra tools (optional)
|
11 |
-
# RUN apt-get update && apt-get install -y docker.io git
|
12 |
|
13 |
-
#
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM jenkins/jenkins:lts
|
2 |
|
3 |
+
# Set Jenkins to run on 0.0.0.0:7860
|
4 |
+
ENV JENKINS_OPTS="--httpListenAddress=0.0.0.0 --httpPort=7860"
|
5 |
|
6 |
+
# Expose the new Jenkins port
|
7 |
+
EXPOSE 7860
|
8 |
|
|
|
|
|
9 |
|
10 |
+
# # Optional: Disable the setup wizard (useful for automation)
|
11 |
+
# ENV JAVA_OPTS="-Djenkins.install.runSetupWizard=false"
|
12 |
+
|
13 |
+
# # Switch to root to install tools or modify system (optional)
|
14 |
+
# USER root
|
15 |
+
|
16 |
+
# # Example: Install extra tools (optional)
|
17 |
+
# # RUN apt-get update && apt-get install -y docker.io git
|
18 |
+
|
19 |
+
# # Switch back to jenkins user (required for Jenkins to run properly)
|
20 |
+
# USER jenkins
|