mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
Refactor Docker scripts
This commit is contained in:
parent
8e99b792b2
commit
12775960dc
69 changed files with 26 additions and 457 deletions
25
docker/build.sh
Executable file
25
docker/build.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ ! -e docker_conf.inc ]; then
|
||||
echo "This script must be run from within one of the subfolders"
|
||||
exit 1
|
||||
fi
|
||||
. docker_conf.inc
|
||||
# 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
|
||||
|
||||
# For cross-platform support:
|
||||
# cf https://github.com/multiarch/qemu-user-static
|
||||
#sudo apt install qemu-user-static
|
||||
#docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
#docker buildx create --use
|
||||
#docker buildx inspect --bootstrap
|
||||
#docker buildx build $DOCKER_PLATFORM $BUILDARG -t "$DOCKER_IMAGE" --load .
|
||||
# Seems to work without buildx:
|
||||
docker build $DOCKER_PLATFORM $BUILDARG -t "$DOCKER_IMAGE" .
|
Loading…
Add table
Add a link
Reference in a new issue