Package or bust!
This commit is contained in:
@@ -5,7 +5,7 @@ LABEL org.opencontainers.image.title="Jenkins CI/CD"
|
||||
LABEL org.opencontainers.image.description="Cloudron package for Jenkins CI/CD Platform"
|
||||
LABEL org.opencontainers.image.source="https://github.com/jenkinsci/jenkins"
|
||||
|
||||
# Install Java and Jenkins dependencies
|
||||
# Install Java and dependencies
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
openjdk-17-jdk \
|
||||
curl \
|
||||
@@ -23,7 +23,7 @@ RUN mkdir -p /app/data/jenkins_home && \
|
||||
mkdir -p /app/pkg && \
|
||||
chown -R cloudron:cloudron /app/data
|
||||
|
||||
# Download and install Jenkins WAR file
|
||||
# Download Jenkins WAR file
|
||||
ARG JENKINS_VERSION=2.450
|
||||
RUN cd /tmp && \
|
||||
curl -fsSL "https://get.jenkins.io/war/${JENKINS_VERSION}/jenkins.war" -o jenkins.war && \
|
||||
@@ -34,19 +34,25 @@ RUN cd /tmp && \
|
||||
COPY start.sh /app/pkg/start.sh
|
||||
COPY CloudronManifest.json /app/pkg/CloudronManifest.json
|
||||
COPY CloudronManifest.json /CloudronManifest.json
|
||||
RUN chmod +x /app/pkg/start.sh && chown cloudron:cloudron /app/pkg/start.sh /app/pkg/CloudronManifest.json /CloudronManifest.json
|
||||
|
||||
# Set permissions
|
||||
RUN chmod +x /app/pkg/start.sh && \
|
||||
chown cloudron:cloudron /app/pkg/start.sh /app/pkg/CloudronManifest.json /CloudronManifest.json
|
||||
|
||||
# Switch to cloudron user
|
||||
USER cloudron
|
||||
|
||||
# Expose Jenkins port
|
||||
# Expose port
|
||||
EXPOSE 8080
|
||||
|
||||
# Jenkins environment variables
|
||||
# Set environment variables
|
||||
ENV JENKINS_HOME=/app/data/jenkins_home \
|
||||
JENKINS_OPTS="--httpPort=8080 --httpListenAddress=0.0.0.0" \
|
||||
APP_PORT=8080
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
||||
CMD curl -fsS http://127.0.0.1:${APP_PORT}/login || exit 1
|
||||
CMD curl -fsS http://127.0.0.1:${APP_PORT}/login || exit 1
|
||||
|
||||
CMD ["/app/pkg/start.sh"]
|
||||
# Start Jenkins
|
||||
CMD ["/app/pkg/start.sh"]
|
Reference in New Issue
Block a user