mirror of
https://github.com/rsyslog/rsyslog.git
synced 2026-06-20 16:52:57 +02:00
make devcontainer tool more developer friendly
slight improvement for easy interactive use
This commit is contained in:
parent
2c1d2f343e
commit
d850865314
@ -1,8 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# This scripts uses an rsyslog development container to execute given
|
# This scripts uses an rsyslog development container to execute given
|
||||||
# command inside it.
|
# 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
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" == "-ti" ]; then
|
||||||
|
ti="-ti"
|
||||||
|
shift 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$RSYSLOG_HOME" == "" ]; then
|
if [ "$RSYSLOG_HOME" == "" ]; then
|
||||||
export RSYSLOG_HOME=$(pwd)
|
export RSYSLOG_HOME=$(pwd)
|
||||||
echo info: RSYSLOG_HOME not set, using $RSYSLOG_HOME
|
echo info: RSYSLOG_HOME not set, using $RSYSLOG_HOME
|
||||||
@ -13,8 +21,9 @@ if [ -z "$RSYSLOG_DEV_CONTAINER" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
printf "/rsyslog is mapped to $RSYSLOG_HOME\n"
|
printf "/rsyslog is mapped to $RSYSLOG_HOME\n"
|
||||||
|
printf "pulling container...\n"
|
||||||
docker pull $RSYSLOG_DEV_CONTAINER
|
docker pull $RSYSLOG_DEV_CONTAINER
|
||||||
docker run \
|
docker run $ti \
|
||||||
-u `id -u`:`id -g` \
|
-u `id -u`:`id -g` \
|
||||||
-e RSYSLOG_CONFIGURE_OPTIONS_EXTRA \
|
-e RSYSLOG_CONFIGURE_OPTIONS_EXTRA \
|
||||||
-e CC \
|
-e CC \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user