Docker: fix test for pm3 when building images
[RRG-proxmark3.git] / docker / ubuntu-18.04 / docker_build.sh
blobd0c94091e41cb32746d6023944b495b7962f4a36
1 #!/bin/bash
3 . docker_conf
4 # Make sure to connect a Proxmark3 when building if you want to be able to access it from within the Docker instance
5 UART_PORT="$(../../pm3 --list|grep /dev|head -n1|cut -d' ' -f2)"
6 if [ -n "$UART_PORT" ]; then
7 UART_GID="$(stat -c '%g' $UART_PORT)"
8 BUILDARG="--build-arg UART_GID=$UART_GID"
9 else
10 BUILDARG=""
12 docker build $BUILDARG -t "$DOCKER_IMAGE" .