mirror of
https://github.com/bensuperpc/dockcross.git
synced 2025-04-11 08:10:29 +02:00
Merge pull request #51 from jcfr/dockcross-ignore-rm-error-when-running-in-unprivileged-lxc-container
dockcross: Ignore deletion error when running in unprivileged LXC container
This commit is contained in:
commit
e378a9b336
@ -180,11 +180,20 @@ fi
|
|||||||
# Now, finally, run the command in a container
|
# Now, finally, run the command in a container
|
||||||
#
|
#
|
||||||
tty -s && TTY_ARGS=-ti || TTY_ARGS=
|
tty -s && TTY_ARGS=-ti || TTY_ARGS=
|
||||||
docker run $TTY_ARGS --rm \
|
CONTAINER_NAME=dockcross_$(cat /dev/urandom | base64 | tr -dc 'a-zA-Z0-9' | fold -w 7 | head -n 1)
|
||||||
|
docker run $TTY_ARGS --name $CONTAINER_NAME \
|
||||||
-v $PWD:/work \
|
-v $PWD:/work \
|
||||||
$USER_IDS \
|
$USER_IDS \
|
||||||
$FINAL_ARGS \
|
$FINAL_ARGS \
|
||||||
$FINAL_IMAGE "$@"
|
$FINAL_IMAGE "$@"
|
||||||
|
run_exit_code=$?
|
||||||
|
|
||||||
|
# Deleting the container while ignoring error is required because of
|
||||||
|
# https://circleci.com/docs/docker-btrfs-error/.
|
||||||
|
# See issue dockcross/dockcross#50 for more details.
|
||||||
|
docker rm -f $CONTAINER_NAME > /dev/null || true
|
||||||
|
|
||||||
|
exit $run_exit_code
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user