mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
all Docker envs: add support for connection to host device
This commit is contained in:
parent
9c4e821f94
commit
f09705868a
73 changed files with 307 additions and 63 deletions
|
@ -16,6 +16,10 @@ RUN zypper --non-interactive install ocl-icd-devel
|
|||
# Create rrg user
|
||||
RUN useradd -ms /bin/bash rrg
|
||||
RUN passwd -d rrg
|
||||
ARG UART_GID
|
||||
# dialout group may already exist on another numeric ID than on host
|
||||
RUN groupadd -g ${UART_GID} mydialout || true
|
||||
RUN usermod -aG ${UART_GID} rrg
|
||||
RUN printf 'rrg ALL=(ALL) NOPASSWD: ALL\n' | tee -a /etc/sudoers
|
||||
|
||||
USER rrg
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
docker build -t "pm3-suse-leap:1.0" .
|
||||
. docker_conf
|
||||
UART_PORT="$(../../pm3 --list|head -n1|cut -d' ' -f2)"
|
||||
UART_GID="$(stat -c '%g' $UART_PORT)"
|
||||
docker build --build-arg UART_GID="$UART_GID" -t "$DOCKER_IMAGE" .
|
||||
|
|
2
docker/opensuse-leap/docker_conf
Normal file
2
docker/opensuse-leap/docker_conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
# sourceme
|
||||
DOCKER_IMAGE=pm3-suse-leap:1.0
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
docker rm $(docker ps -aq --filter ancestor=pm3-suse-leap:1.0)
|
||||
docker image rm pm3-suse-leap:1.0
|
||||
. docker_conf
|
||||
docker rm $(docker ps -aq --filter ancestor="$DOCKER_IMAGE")
|
||||
docker image rm "$DOCKER_IMAGE"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -w /home/rrg/proxmark3 -it pm3-suse-leap:1.0
|
||||
. 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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue