mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-11-09 20:57:26 +01:00
dockcross: Ignore deletion error when running in unprivileged LXC container
This commit workarounds the problem described in [1] and [2] by ignoring error happening when deleting container in unprivileged LXC container. Fixes #50 [1] https://circleci.com/docs/docker-btrfs-error/ [2] https://discuss.circleci.com/t/docker-error-removing-intermediate-container/70
This commit is contained in:
parent
32704fb4e4
commit
2e71db2234
@ -180,12 +180,17 @@ fi
|
||||
# Now, finally, run the command in a container
|
||||
#
|
||||
tty -s && TTY_ARGS=-ti || TTY_ARGS=
|
||||
docker run $TTY_ARGS --rm \
|
||||
CONTAINER_NAME=dockcross
|
||||
docker run $TTY_ARGS --name $CONTAINER_NAME \
|
||||
-v $PWD:/work \
|
||||
$USER_IDS \
|
||||
$FINAL_ARGS \
|
||||
$FINAL_IMAGE "$@"
|
||||
|
||||
docker rm -f $CONTAINER_NAME > /dev/null && \
|
||||
echo "Successfull removed container: $CONTAINER_NAME" || \
|
||||
(echo "Failed to remove container: Ignoring error" && true)
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# This image is not intended to be run manually.
|
||||
|
Loading…
Reference in New Issue
Block a user