Spaces:
Paused
Paused
# 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"] |