Spaces:
Paused
Paused
jenkins server dockerfile
Browse files- Dockerfile +17 -0
Dockerfile
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Start from the official Jenkins image
|
2 |
+
FROM jenkins/jenkins:jdk21
|
3 |
+
|
4 |
+
# Switch to the root user to install tools or make any necessary modifications
|
5 |
+
USER root
|
6 |
+
|
7 |
+
# Expose the desired port
|
8 |
+
EXPOSE 7860
|
9 |
+
|
10 |
+
# Set the environment variable for Jenkins to listen on the custom port
|
11 |
+
ENV JENKINS_OPTS="--httpPort=7860"
|
12 |
+
|
13 |
+
# Switch back to the jenkins user
|
14 |
+
USER jenkins
|
15 |
+
|
16 |
+
# Run Jenkins
|
17 |
+
CMD ["/usr/local/bin/jenkins.sh"]
|