Refactor Docker scripts

This commit is contained in:
Philippe Teuwen 2024-12-18 22:18:05 +01:00
commit 12775960dc
69 changed files with 26 additions and 457 deletions

View file

@ -1,12 +0,0 @@
#!/bin/bash
. docker_conf
# Make sure to connect a Proxmark3 when building if you want to be able to access it from within the Docker instance
UART_PORT="$(../../pm3 --list|grep /dev|head -n1|cut -d' ' -f2)"
if [ -n "$UART_PORT" ]; then
UART_GID="$(stat -c '%g' $UART_PORT)"
BUILDARG="--build-arg UART_GID=$UART_GID"
else
BUILDARG=""
fi
docker build $BUILDARG -t "$DOCKER_IMAGE" .

View file

@ -1,2 +0,0 @@
# sourceme
DOCKER_IMAGE=pm3-arch:1.0

View file

@ -1,5 +0,0 @@
#!/bin/bash
. docker_conf
docker rm $(docker ps -aq --filter ancestor="$DOCKER_IMAGE")
docker image rm "$DOCKER_IMAGE"

View file

@ -1,10 +0,0 @@
#!/bin/bash
. docker_conf
UART_PORT="$(../../pm3 --list|grep dev|head -n1|cut -d' ' -f2)"
if [ -n "$UART_PORT" ]; then
DEV="--device=/dev/tty0 --device=$UART_PORT"
else
DEV=""
fi
docker run $DEV --volume="$(pwd)/../..:/home/rrg/proxmark3" -w /home/rrg/proxmark3 -it "$DOCKER_IMAGE"