make devcontainer tool more developer friendly

slight improvement for easy interactive use
This commit is contained in:
Rainer Gerhards 2018-07-12 16:54:20 +02:00
parent 2c1d2f343e
commit d850865314

View File

@ -1,8 +1,16 @@
#!/bin/bash
# This scripts uses an rsyslog development container to execute given
# command inside it.
# Note: command line parameters are passed as parameters to the container,
# with the notable exception that -ti, if given as first parameter, is
# passed to "docker run" itself but NOT the container.
set -e
if [ "$1" == "-ti" ]; then
ti="-ti"
shift 1
fi
if [ "$RSYSLOG_HOME" == "" ]; then
export RSYSLOG_HOME=$(pwd)
echo info: RSYSLOG_HOME not set, using $RSYSLOG_HOME
@ -13,8 +21,9 @@ if [ -z "$RSYSLOG_DEV_CONTAINER" ]; then
fi
printf "/rsyslog is mapped to $RSYSLOG_HOME\n"
printf "pulling container...\n"
docker pull $RSYSLOG_DEV_CONTAINER
docker run \
docker run $ti \
-u `id -u`:`id -g` \
-e RSYSLOG_CONFIGURE_OPTIONS_EXTRA \
-e CC \