Refactor Docker scripts

This commit is contained in:
Philippe Teuwen committed 2024-12-18 22:24:20 +01:00
1 parent 8e99b792b2
commit 12775960dc
69 files changed
+26 -457

No files matched your search

-12
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" .
-2
View File
@@ -1,2 +0,0 @@
# sourceme
DOCKER_IMAGE=pm3-arch:1.0
-5
View File
@@ -1,5 +0,0 @@
#!/bin/bash
. docker_conf
docker rm $(docker ps -aq --filter ancestor="$DOCKER_IMAGE")
docker image rm "$DOCKER_IMAGE"
-10
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"