all Docker envs: add support for connection to host device

This commit is contained in:
Philippe Teuwen 2024-12-18 13:29:50 +01:00
commit f09705868a
73 changed files with 307 additions and 63 deletions

View file

@ -15,6 +15,10 @@ RUN pacman -S --noconfirm ocl-icd
# 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) ALL\n' | tee -a /etc/sudoers
USER rrg

View file

@ -1,3 +1,6 @@
#!/bin/bash
docker build -t "pm3-arch: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" .

View file

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

View file

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

View file

@ -1,3 +1,10 @@
#!/bin/bash
docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -w /home/rrg/proxmark3 -it pm3-arch: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"

View file

@ -20,6 +20,10 @@ RUN apt-get install -y opencl-dev && \
# 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) ALL\n' | tee -a /etc/sudoers
USER rrg

View file

@ -1,3 +1,6 @@
#!/bin/bash
docker build -t "pm3-debian-bullseye: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" .

View file

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

View file

@ -1,4 +1,5 @@
#!/bin/bash
docker rm $(docker ps -aq --filter ancestor=pm3-debian-bullseye:1.0)
docker image rm pm3-debian-bullseye:1.0
. docker_conf
docker rm $(docker ps -aq --filter ancestor="$DOCKER_IMAGE")
docker image rm "$DOCKER_IMAGE"

View file

@ -1,3 +1,10 @@
#!/bin/bash
docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -w /home/rrg/proxmark3 -it pm3-debian-bullseye: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"

View file

@ -18,6 +18,10 @@ RUN apt-get install -y opencl-dev && \
# 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) ALL\n' | tee -a /etc/sudoers
USER rrg

View file

@ -1,3 +1,6 @@
#!/bin/bash
docker build -t "pm3-debian-bookworm: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" .

View file

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

View file

@ -1,4 +1,5 @@
#!/bin/bash
docker rm $(docker ps -aq --filter ancestor=pm3-debian-bookworm:1.0)
docker image rm pm3-debian-bookworm:1.0
. docker_conf
docker rm $(docker ps -aq --filter ancestor="$DOCKER_IMAGE")
docker image rm "$DOCKER_IMAGE"

View file

@ -1,3 +1,10 @@
#!/bin/bash
docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -w /home/rrg/proxmark3 -it pm3-debian-bookworm: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"

View file

@ -18,6 +18,10 @@ RUN apt-get install -y opencl-dev && \
# 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) ALL\n' | tee -a /etc/sudoers
USER rrg

View file

@ -1,3 +1,6 @@
#!/bin/bash
docker build -t "pm3-debian-trixie: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" .

View file

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

View file

@ -1,4 +1,5 @@
#!/bin/bash
docker rm $(docker ps -aq --filter ancestor=pm3-debian-trixie:1.0)
docker image rm pm3-debian-trixie:1.0
. docker_conf
docker rm $(docker ps -aq --filter ancestor="$DOCKER_IMAGE")
docker image rm "$DOCKER_IMAGE"

View file

@ -1,3 +1,10 @@
#!/bin/bash
docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -w /home/rrg/proxmark3 -it pm3-debian-trixie: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"

View file

@ -13,6 +13,10 @@ RUN yum -y install mesa-libOpenCL 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) ALL\n' | tee -a /etc/sudoers
USER rrg

View file

@ -1,3 +1,6 @@
#!/bin/bash
docker build -t "pm3-fedora-36: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" .

View file

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

View file

@ -1,4 +1,5 @@
#!/bin/bash
docker rm $(docker ps -aq --filter ancestor=pm3-fedora-36:1.0)
docker image rm pm3-fedora-36:1.0
. docker_conf
docker rm $(docker ps -aq --filter ancestor="$DOCKER_IMAGE")
docker image rm "$DOCKER_IMAGE"

View file

@ -1,3 +1,10 @@
#!/bin/bash
docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -w /home/rrg/proxmark3 -it pm3-fedora-36: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"

View file

@ -13,6 +13,10 @@ RUN yum -y install mesa-libOpenCL 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) ALL\n' | tee -a /etc/sudoers
USER rrg

View file

@ -1,3 +1,6 @@
#!/bin/bash
docker build -t "pm3-fedora-37: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" .

View file

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

View file

@ -1,4 +1,5 @@
#!/bin/bash
docker rm $(docker ps -aq --filter ancestor=pm3-fedora-37:1.0)
docker image rm pm3-fedora-37:1.0
. docker_conf
docker rm $(docker ps -aq --filter ancestor="$DOCKER_IMAGE")
docker image rm "$DOCKER_IMAGE"

View file

@ -1,3 +1,10 @@
#!/bin/bash
docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -w /home/rrg/proxmark3 -it pm3-fedora-37: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"

View file

@ -2,6 +2,11 @@ FROM homebrew/brew
ENV LANG=C
ARG UART_GID
# dialout group may already exist on another numeric ID than on host
RUN sudo groupadd -g ${UART_GID} mydialout || true
RUN sudo usermod -aG ${UART_GID} linuxbrew
USER linuxbrew
WORKDIR "/home/linuxbrew"
RUN brew install cmake pkg-config bzip2 lz4 && rm -rf ~/.cache/Homebrew

View file

@ -8,9 +8,10 @@ So only host bins can be built (except tools/hitag2crack/crack5opencl which need
```sh
make -j client USE_BREW=1 SKIPREADLINE=1
make -j mfkey
make -j nonce2key
make -j mf_nonce_brute
make -j cryptorf
make -j mfc_card_only
make -j mfc_card_reader
make -j mfd_aes_brute
make -j hitag2crack SKIPOPENCL=1
make -j fpga_compress
```

View file

@ -1,3 +1,6 @@
#!/bin/bash
docker build -t "pm3-brew: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" .

View file

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

View file

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

View file

@ -1,4 +1,11 @@
#!/bin/bash
docker run --volume=$(pwd)/../..:/home/linuxbrew/proxmark3 -w /home/linuxbrew/proxmark3 -it pm3-brew: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"
# if needed, run brew as user linuxbrew

View file

@ -9,10 +9,8 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends git ca-certificates build-essential cmake pkg-config libreadline-dev gcc-arm-none-eabi libnewlib-dev libbz2-dev liblz4-dev libbluetooth-dev libpython3-dev libssl-dev libgd-dev sudo && \
apt-get clean
RUN apt-get install -y python3-minimal && \
apt-get install -y python3-pip && \
apt-get clean && \
python3 -m pip install ansicolors sslcrypto
RUN apt-get install -y --no-install-recommends python3-minimal python3-pip python3-venv && \
apt-get clean
RUN apt-get install -y opencl-dev && \
apt-get clean
@ -20,6 +18,10 @@ RUN apt-get install -y opencl-dev && \
# 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) ALL\n' | tee -a /etc/sudoers
USER rrg

View file

@ -1,3 +1,6 @@
#!/bin/bash
docker build -t "pm3-kali: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/kali/docker_conf Normal file
View file

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

View file

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

View file

@ -1,3 +1,10 @@
#!/bin/bash
docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -w /home/rrg/proxmark3 -it pm3-kali: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"

View file

@ -5,4 +5,9 @@
# docker/kali/run_tests.sh;
sudo apt update && sudo apt upgrade -y
python3 -m venv /tmp/venv
source /tmp/venv/bin/activate
python3 -m pip install --use-pep517 pyaes
python3 -m pip install ansicolors sslcrypto
tools/release_tests.sh
deactivate

View file

@ -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

View file

@ -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" .

View file

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

View file

@ -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"

View file

@ -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"

View file

@ -15,6 +15,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

View file

@ -1,3 +1,6 @@
#!/bin/bash
docker build -t "pm3-suse-tumbleweed: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" .

View file

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

View file

@ -1,4 +1,5 @@
#!/bin/bash
docker rm $(docker ps -aq --filter ancestor=pm3-suse-tumbleweed:1.0)
docker image rm pm3-suse-tumbleweed:1.0
. docker_conf
docker rm $(docker ps -aq --filter ancestor="$DOCKER_IMAGE")
docker image rm "$DOCKER_IMAGE"

View file

@ -1,3 +1,10 @@
#!/bin/bash
docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -w /home/rrg/proxmark3 -it pm3-suse-tumbleweed: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"

View file

@ -18,6 +18,10 @@ RUN apt-get install -y opencl-dev && \
# 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) ALL\n' | tee -a /etc/sudoers
USER rrg

View file

@ -1,3 +1,6 @@
#!/bin/bash
docker build -t "pm3-parrotsec-core-latest: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" .

View file

@ -0,0 +1,2 @@
# sourceme
DOCKER_IMAGE=pm3-parrotsec-core-latest:1.0

View file

@ -1,4 +1,5 @@
#!/bin/bash
docker rm $(docker ps -aq --filter ancestor=pm3-parrotsec-core-latest:1.0)
docker image rm pm3-parrotsec-core-latest:1.0
. docker_conf
docker rm $(docker ps -aq --filter ancestor="$DOCKER_IMAGE")
docker image rm "$DOCKER_IMAGE"

View file

@ -1,3 +1,10 @@
#!/bin/bash
docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -w /home/rrg/proxmark3 -it pm3-parrotsec-core-latest: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"

View file

@ -21,6 +21,10 @@ RUN apt-get install -y opencl-dev && \
# 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) ALL\n' | tee -a /etc/sudoers
USER rrg

View file

@ -1,3 +1,6 @@
#!/bin/bash
docker build -t "pm3-ubuntu-18.04: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" .

View file

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

View file

@ -1,4 +1,5 @@
#!/bin/bash
docker rm $(docker ps -aq --filter ancestor=pm3-ubuntu-18.04:1.0)
docker image rm pm3-ubuntu-18.04:1.0
. docker_conf
docker rm $(docker ps -aq --filter ancestor="$DOCKER_IMAGE")
docker image rm "$DOCKER_IMAGE"

View file

@ -1,3 +1,10 @@
#!/bin/bash
docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -w /home/rrg/proxmark3 -it pm3-ubuntu-18.04: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"

View file

@ -20,6 +20,10 @@ RUN apt-get install -y opencl-dev && \
# 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) ALL\n' | tee -a /etc/sudoers
USER rrg

View file

@ -1,3 +1,6 @@
#!/bin/bash
docker build -t "pm3-ubuntu-20.04: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" .

View file

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

View file

@ -1,4 +1,5 @@
#!/bin/bash
docker rm $(docker ps -aq --filter ancestor=pm3-ubuntu-20.04:1.0)
docker image rm pm3-ubuntu-20.04:1.0
. docker_conf
docker rm $(docker ps -aq --filter ancestor="$DOCKER_IMAGE")
docker image rm "$DOCKER_IMAGE"

View file

@ -1,3 +1,10 @@
#!/bin/bash
docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -w /home/rrg/proxmark3 -it pm3-ubuntu-20.04: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"

View file

@ -20,6 +20,10 @@ RUN apt-get install -y opencl-dev && \
# 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) ALL\n' | tee -a /etc/sudoers
USER rrg

View file

@ -1,3 +1,6 @@
#!/bin/bash
docker build -t "pm3-ubuntu-22.04: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" .

View file

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

View file

@ -1,4 +1,5 @@
#!/bin/bash
docker rm $(docker ps -aq --filter ancestor=pm3-ubuntu-22.04:1.0)
docker image rm pm3-ubuntu-22.04:1.0
. docker_conf
docker rm $(docker ps -aq --filter ancestor="$DOCKER_IMAGE")
docker image rm "$DOCKER_IMAGE"

View file

@ -1,3 +1,10 @@
#!/bin/bash
docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -w /home/rrg/proxmark3 -it pm3-ubuntu-22.04: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"