mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-17 15:10:42 +01: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
|
||||
# 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 \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user