2020-09-25 23:17:11 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# $DRONE_CONFIG_FILE contains path to the config file
|
|
|
|
|
2020-09-26 00:11:42 +02:00
|
|
|
if [[ -z "${DOCKER_DRONE_CONFIG_FILE}" ]] ; then
|
|
|
|
echo "DOCKER_DRONE_CONFIG_FILE not set!"
|
2020-09-25 23:17:11 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-09-26 00:11:42 +02:00
|
|
|
. "${DOCKER_DRONE_CONFIG_FILE}"
|
2020-09-25 23:17:11 +02:00
|
|
|
|
2020-09-25 23:46:10 +02:00
|
|
|
docker_args=""
|
|
|
|
|
|
|
|
for var in "${!DRONE_@}" ; do
|
2020-09-26 00:11:42 +02:00
|
|
|
docker_args="${docker_args} --env=${var}=${!var}"
|
2020-09-25 23:46:10 +02:00
|
|
|
done
|
2020-09-25 23:17:11 +02:00
|
|
|
|
|
|
|
for p in ${DOCKER_PUBLISH} ; do
|
2020-09-25 23:46:10 +02:00
|
|
|
docker_args="${docker_args} --publish=${p}"
|
2020-09-25 23:17:11 +02:00
|
|
|
done
|
|
|
|
|
2020-09-26 00:25:06 +02:00
|
|
|
docker_args="${docker_args} ${DOCKER_DRONE_EXTRA_ARGS}"
|
|
|
|
|
2020-09-25 23:17:11 +02:00
|
|
|
docker run \
|
|
|
|
--volume=/var/lib/drone:/data \
|
2020-09-26 00:11:42 +02:00
|
|
|
${docker_args} \
|
2020-09-25 23:17:11 +02:00
|
|
|
--restart=always \
|
2020-09-26 00:25:06 +02:00
|
|
|
--detach=false \
|
2020-09-25 23:17:11 +02:00
|
|
|
--name=drone \
|
|
|
|
drone/drone:<VERSION>
|