gentoo-overlay/dev-util/drone/files/drone.sh

30 lines
591 B
Bash
Raw Normal View History

#!/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!"
exit 1
fi
2020-09-26 00:11:42 +02:00
. "${DOCKER_DRONE_CONFIG_FILE}"
docker_args=""
for var in "${!DRONE_@}" ; do
2020-09-26 00:11:42 +02:00
docker_args="${docker_args} --env=${var}=${!var}"
done
for p in ${DOCKER_PUBLISH} ; do
docker_args="${docker_args} --publish=${p}"
done
docker_args="${docker_args} ${DOCKER_DRONE_EXTRA_ARGS}"
docker run \
--volume=/var/lib/drone:/data \
2020-09-26 00:11:42 +02:00
${docker_args} \
--restart=always \
--detach=false \
--name=drone \
drone/drone:<VERSION>