Skip to content

Instantly share code, notes, and snippets.

@Icehunter
Created November 26, 2024 03:37
Show Gist options
  • Save Icehunter/c8bb3dfded0cd937a0f8a14de4f13f0c to your computer and use it in GitHub Desktop.
Save Icehunter/c8bb3dfded0cd937a0f8a14de4f13f0c to your computer and use it in GitHub Desktop.
FROM openjdk:17-jdk-slim
# Environment variables
ENV SWARM_VERSION=3.31
ENV SWARM_CLIENT_JAR=/usr/share/jenkins/swarm-client.jar
# Download Swarm Client JAR
RUN apt-get update && apt-get install -y curl && apt-get clean \
&& mkdir -p /usr/share/jenkins \
&& curl -L -o ${SWARM_CLIENT_JAR} https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/swarm-client/${SWARM_VERSION}/swarm-client-${SWARM_VERSION}.jar \
&& chmod +x ${SWARM_CLIENT_JAR}
# Set working directory
WORKDIR /usr/share/jenkins
# Use entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Default entrypoint
ENTRYPOINT ["/entrypoint.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment