if [ $# -eq 0 ]; then
RUN_COMMAND="/bin/bash"
else
- RUN_COMMAND="${@}"
+ RUN_COMMAND=""
fi
which docker &>/dev/null || die "docker must be on the PATH."
fi
if [ ${ALLOCATE_TTY} == 1 ]; then
- docker exec -it "${DOCKER_IMAGE_ID}" ${RUN_COMMAND}
+ docker exec -it "${DOCKER_IMAGE_ID}" "${@}" ${RUN_COMMAND}
else
- docker exec -i "${DOCKER_IMAGE_ID}" ${RUN_COMMAND} &
+ docker exec -i "${DOCKER_IMAGE_ID}" "${@}" ${RUN_COMMAND} &
wait
fi