Created
January 4, 2022 14:25
-
-
Save jefrnc/8abb2b736d7df849556b2d0c21d0b08a to your computer and use it in GitHub Desktop.
Dockerfile for Slave Agent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
if [ "${1#-}" != "$1" ]; then | |
set -- docker "$@" | |
fi | |
if docker help "$1" > /dev/null 2>&1; then | |
set -- docker "$@" | |
fi | |
if [ -z "$DOCKER_HOST" -a "$DOCKER_PORT_2375_TCP" ]; then | |
export DOCKER_HOST='tcp://docker:2375' | |
fi | |
exec "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jenkins/jnlp-agent-docker | |
USER root | |
RUN apk update && \ | |
apk add -u libcurl curl && \ | |
apk add --no-cache libc6-compat bash openssh-client git python2 py-pip ansible && \ | |
rm -rf /tmp/* && \ | |
rm -rf /var/cache/apk/* | |
USER jenkins |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment