lotr-sut/jenkins/Dockerfile
Fellowship Scholar f6a5823439 init commit
2026-03-29 20:07:56 +00:00

29 lines
934 B
Docker

FROM jenkins/jenkins:lts-jdk17
# Skip setup wizard — pre-configured via JCasC
ENV JAVA_OPTS="-Djenkins.install.runSetupWizard=false -Dhudson.security.csrf.GlobalCrumbIssuerConfiguration.DISABLE_CSRF_PROTECTION=false"
ENV CASC_JENKINS_CONFIG=/var/jenkins_home/casc_configs
USER root
# Install prerequisite tools for pipeline stages (Python 3, Node.js, Docker CLI)
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-pip python3-venv \
nodejs npm \
curl \
docker.io \
&& rm -rf /var/lib/apt/lists/*
# Allow jenkins user to run docker commands via the host socket
RUN usermod -aG docker jenkins || true
USER jenkins
# Install plugins from list
COPY plugins.txt /usr/share/jenkins/plugins.txt
RUN jenkins-plugin-cli --plugin-file /usr/share/jenkins/plugins.txt \
--latest false
# Copy Jenkins Configuration as Code
COPY casc/ /var/jenkins_home/casc_configs/