mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-11-10 05:07:26 +01:00
dockcross: Add support for per-project configuration
This commit is contained in:
parent
b8317c88a0
commit
4ad3e1a94f
16
README.rst
16
README.rst
@ -210,8 +210,8 @@ convenience target ``display_images`` could be used::
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
Configuration
|
Dockcross configuration
|
||||||
-------------
|
-----------------------
|
||||||
|
|
||||||
The following environmental variables and command-line options are used. In
|
The following environmental variables and command-line options are used. In
|
||||||
all cases, the command-line option overrides the environment variable.
|
all cases, the command-line option overrides the environment variable.
|
||||||
@ -238,6 +238,18 @@ Extra arguments to pass to the ``docker run`` command. Quote the entire set of
|
|||||||
args if they contain spaces.
|
args if they contain spaces.
|
||||||
|
|
||||||
|
|
||||||
|
Pre-project dockcross configuration
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
If a shell script named ``.dockcross`` is found in the current directory where
|
||||||
|
the dockcross script is started, it is executed before the dockcross script
|
||||||
|
``command`` argument. The shell script is expected to have a shebang like
|
||||||
|
``#!/bin/bash``.
|
||||||
|
|
||||||
|
For example, commands like ``git config --global advice.detachedHead false`` can
|
||||||
|
be added to this script.
|
||||||
|
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
@ -35,6 +35,11 @@ if [[ -n $BUILDER_UID ]] && [[ -n $BUILDER_GID ]]; then
|
|||||||
/dockcross/pre_exec.sh
|
/dockcross/pre_exec.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Execute project specific pre execution hook
|
||||||
|
if [[ -e /work/.dockcross ]]; then
|
||||||
|
chpst -u :$BUILDER_UID:$BUILDER_GID /work/.dockcross
|
||||||
|
fi
|
||||||
|
|
||||||
# Run the command as the specified user/group.
|
# Run the command as the specified user/group.
|
||||||
exec chpst -u :$BUILDER_UID:$BUILDER_GID "$@"
|
exec chpst -u :$BUILDER_UID:$BUILDER_GID "$@"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user