blob: 1bca04cb56e21e70776d51ef6d53ffddffd8022c [file] [log] [blame]
Nicolas De Loofd6064382014-10-04 08:17:28 +02001#! /bin/bash
2
Nicolas De Loof07c307d2014-10-07 14:02:42 +02003# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
4if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
Nicolas De loofb2b442e2014-10-08 08:05:02 +02005 exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS --prefix=$JENKINS_PREFIX "$@"
Nicolas De Loof07c307d2014-10-07 14:02:42 +02006fi
7
8# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
Nicolas De loofb2b442e2014-10-08 08:05:02 +02009exec "$@"
Nicolas De Loofd6064382014-10-04 08:17:28 +020010