3 if [ ! -e docker_conf.inc
]; then
4 echo "This script must be run from within one of the subfolders"
8 # Make sure to connect a Proxmark3 when building if you want to be able to access it from within the Docker instance
9 UART_PORT
="$(../../pm3 --list|grep /dev|head -n1|cut -d' ' -f2)"
10 if [ -n "$UART_PORT" ]; then
11 UART_GID
="$(stat -c '%g' $UART_PORT)"
12 BUILDARG
="--build-arg UART_GID=$UART_GID"
17 # For cross-platform support:
18 # cf https://github.com/multiarch/qemu-user-static
19 #sudo apt install qemu-user-static
20 # credential=yes needed to get proper sudo support in cross-platform Docker instances
21 #docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes
22 #docker buildx create --use
23 #docker buildx inspect --bootstrap
24 #docker buildx build $DOCKER_PLATFORM $BUILDARG -t "$DOCKER_IMAGE" --load .
25 # Seems to work without buildx:
26 docker build
$DOCKER_PLATFORM $BUILDARG -t "$DOCKER_IMAGE" .