From e5a97f3e801d3665dee49c245d171ca46e180faf Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 8 Jun 2020 02:53:13 +0200 Subject: [PATCH] dockerfiles for tests --- docker/archlinux/Dockerfile | 19 +++++++++++++++++++ docker/archlinux/docker_build.sh | 3 +++ docker/archlinux/docker_run.sh | 3 +++ docker/debian/Dockerfile | 19 +++++++++++++++++++ docker/debian/docker_build.sh | 3 +++ docker/debian/docker_run.sh | 3 +++ docker/fedora/Dockerfile | 15 +++++++++++++++ docker/fedora/docker_build.sh | 3 +++ docker/fedora/docker_run.sh | 3 +++ docker/opensuse/Dockerfile | 16 ++++++++++++++++ docker/opensuse/docker_build.sh | 3 +++ docker/opensuse/docker_run.sh | 3 +++ docker/ubuntu/Dockerfile | 19 +++++++++++++++++++ docker/ubuntu/docker_build.sh | 3 +++ docker/ubuntu/docker_run.sh | 3 +++ 15 files changed, 118 insertions(+) create mode 100644 docker/archlinux/Dockerfile create mode 100755 docker/archlinux/docker_build.sh create mode 100755 docker/archlinux/docker_run.sh create mode 100644 docker/debian/Dockerfile create mode 100755 docker/debian/docker_build.sh create mode 100755 docker/debian/docker_run.sh create mode 100644 docker/fedora/Dockerfile create mode 100755 docker/fedora/docker_build.sh create mode 100755 docker/fedora/docker_run.sh create mode 100644 docker/opensuse/Dockerfile create mode 100755 docker/opensuse/docker_build.sh create mode 100755 docker/opensuse/docker_run.sh create mode 100644 docker/ubuntu/Dockerfile create mode 100755 docker/ubuntu/docker_build.sh create mode 100755 docker/ubuntu/docker_run.sh diff --git a/docker/archlinux/Dockerfile b/docker/archlinux/Dockerfile new file mode 100644 index 000000000..c5517c0fb --- /dev/null +++ b/docker/archlinux/Dockerfile @@ -0,0 +1,19 @@ +FROM archlinux/base + +ENV LANG C +RUN pacman -Syy +RUN pacman-db-upgrade +# qt5-base skipped +RUN pacman -S --noconfirm sudo git base-devel cmake libusb readline bzip2 arm-none-eabi-gcc arm-none-eabi-newlib --needed + +# Create rrg user +RUN useradd -ms /bin/bash rrg +RUN passwd -d rrg +RUN printf 'rrg ALL=(ALL) ALL\n' | tee -a /etc/sudoers + +USER rrg +WORKDIR "/home/rrg" + +RUN git clone https://aur.archlinux.org/package-query.git && cd package-query && makepkg -si --noconfirm --needed && cd .. && rm -rf package-query + +CMD ["/bin/bash"] diff --git a/docker/archlinux/docker_build.sh b/docker/archlinux/docker_build.sh new file mode 100755 index 000000000..be92402d6 --- /dev/null +++ b/docker/archlinux/docker_build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker build -t "pm3-arch:1.0" . diff --git a/docker/archlinux/docker_run.sh b/docker/archlinux/docker_run.sh new file mode 100755 index 000000000..eac7e1378 --- /dev/null +++ b/docker/archlinux/docker_run.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -it pm3-arch:1.0 diff --git a/docker/debian/Dockerfile b/docker/debian/Dockerfile new file mode 100644 index 000000000..030611739 --- /dev/null +++ b/docker/debian/Dockerfile @@ -0,0 +1,19 @@ +FROM debian:buster-slim + +ENV LANG C +ENV DEBIAN_FRONTEND noninteractive +# qtbase5-dev skipped +RUN apt-get update && \ + apt-get dist-upgrade -y && \ + 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 libbluetooth-dev sudo && \ + apt-get clean + +# Create rrg user +RUN useradd -ms /bin/bash rrg +RUN passwd -d rrg +RUN printf 'rrg ALL=(ALL) ALL\n' | tee -a /etc/sudoers + +USER rrg +WORKDIR "/home/rrg" + +CMD ["/bin/bash"] diff --git a/docker/debian/docker_build.sh b/docker/debian/docker_build.sh new file mode 100755 index 000000000..b051aaf7c --- /dev/null +++ b/docker/debian/docker_build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker build -t "pm3-debian:1.0" . diff --git a/docker/debian/docker_run.sh b/docker/debian/docker_run.sh new file mode 100755 index 000000000..faf35d849 --- /dev/null +++ b/docker/debian/docker_run.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -it pm3-debian:1.0 diff --git a/docker/fedora/Dockerfile b/docker/fedora/Dockerfile new file mode 100644 index 000000000..db634fc0d --- /dev/null +++ b/docker/fedora/Dockerfile @@ -0,0 +1,15 @@ +FROM fedora:31 + +ENV LANG C +# qt5-qtbase-devel skipped +RUN dnf install -y passwd sudo git make gcc gcc-c++ arm-none-eabi-gcc-cs arm-none-eabi-newlib readline-devel bzip2-devel bluez-libs-devel libatomic + +# Create rrg user +RUN useradd -ms /bin/bash rrg +RUN passwd -d rrg +RUN printf 'rrg ALL=(ALL) ALL\n' | tee -a /etc/sudoers + +USER rrg +WORKDIR "/home/rrg" + +CMD ["/bin/bash"] diff --git a/docker/fedora/docker_build.sh b/docker/fedora/docker_build.sh new file mode 100755 index 000000000..e4ef2258a --- /dev/null +++ b/docker/fedora/docker_build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker build -t "pm3-fedora:1.0" . diff --git a/docker/fedora/docker_run.sh b/docker/fedora/docker_run.sh new file mode 100755 index 000000000..79718b831 --- /dev/null +++ b/docker/fedora/docker_run.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -it pm3-fedora:1.0 diff --git a/docker/opensuse/Dockerfile b/docker/opensuse/Dockerfile new file mode 100644 index 000000000..4fa4e93a8 --- /dev/null +++ b/docker/opensuse/Dockerfile @@ -0,0 +1,16 @@ +#FROM opensuse/leap +FROM opensuse/tumbleweed + +ENV LANG C +# libqt5-qtbase-devel skipped +RUN zypper --non-interactive install --no-recommends shadow sudo git patterns-devel-base-devel_basis gcc-c++ readline-devel libbz2-devel cross-arm-none-gcc9 cross-arm-none-newlib-devel + +# Create rrg user +RUN useradd -ms /bin/bash rrg +RUN passwd -d rrg +RUN printf 'rrg ALL=(ALL) NOPASSWD: ALL\n' | tee -a /etc/sudoers + +USER rrg +WORKDIR "/home/rrg" + +CMD ["/bin/bash"] diff --git a/docker/opensuse/docker_build.sh b/docker/opensuse/docker_build.sh new file mode 100755 index 000000000..e25149697 --- /dev/null +++ b/docker/opensuse/docker_build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker build -t "pm3-suse:1.0" . diff --git a/docker/opensuse/docker_run.sh b/docker/opensuse/docker_run.sh new file mode 100755 index 000000000..9b346bf69 --- /dev/null +++ b/docker/opensuse/docker_run.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -it pm3-suse:1.0 diff --git a/docker/ubuntu/Dockerfile b/docker/ubuntu/Dockerfile new file mode 100644 index 000000000..673120e0e --- /dev/null +++ b/docker/ubuntu/Dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu:20.04 + +ENV LANG C +ENV DEBIAN_FRONTEND noninteractive +# qtbase5-dev skipped +RUN apt-get update && \ + apt-get dist-upgrade -y && \ + 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 libbluetooth-dev sudo && \ + apt-get clean + +# Create rrg user +RUN useradd -ms /bin/bash rrg +RUN passwd -d rrg +RUN printf 'rrg ALL=(ALL) ALL\n' | tee -a /etc/sudoers + +USER rrg +WORKDIR "/home/rrg" + +CMD ["/bin/bash"] diff --git a/docker/ubuntu/docker_build.sh b/docker/ubuntu/docker_build.sh new file mode 100755 index 000000000..9c09b3aad --- /dev/null +++ b/docker/ubuntu/docker_build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker build -t "pm3-ubuntu:1.0" . diff --git a/docker/ubuntu/docker_run.sh b/docker/ubuntu/docker_run.sh new file mode 100755 index 000000000..6d43e4d15 --- /dev/null +++ b/docker/ubuntu/docker_run.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker run --volume=$(pwd)/../..:/home/rrg/proxmark3 -it pm3-ubuntu:1.0