File size: 400 Bytes
b44cd98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Start from the official Jenkins image
FROM jenkins/jenkins:jdk21

# Switch to the root user to install tools or make any necessary modifications
USER root

# Expose the desired port
EXPOSE 7860

# Set the environment variable for Jenkins to listen on the custom port
ENV JENKINS_OPTS="--httpPort=7860"

# Switch back to the jenkins user
USER jenkins

# Run Jenkins
CMD ["/usr/local/bin/jenkins.sh"]