diff --git a/docker/rm.sh b/docker/rm.sh index 32a3b1b160..72aab077b0 100755 --- a/docker/rm.sh +++ b/docker/rm.sh @@ -5,5 +5,8 @@ if [ ! -e docker_conf.inc ]; then exit 1 fi . docker_conf.inc -docker rm $(docker ps -aq --filter ancestor="$DOCKER_IMAGE") +CONTAINER=$(docker ps -aq --filter ancestor="$DOCKER_IMAGE") +if [ -n "$CONTAINER" ]; then + docker rm $CONTAINER +fi docker image rm "$DOCKER_IMAGE" diff --git a/docker/run.sh b/docker/run.sh index 34d8fd106a..df178fb6c6 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -11,4 +11,4 @@ if [ -n "$UART_PORT" ]; then else DEV="" fi -docker run $DEV $DOCKER_PLATFORM --volume="$(pwd)/../..:/home/rrg/proxmark3" -w /home/rrg/proxmark3 -it "$DOCKER_IMAGE" +docker run $DEV $DOCKER_PLATFORM --volume="$(pwd)/../..:/home/rrg/proxmark3" -w /home/rrg/proxmark3 --net=host --rm -it "$DOCKER_IMAGE"