From 54672797e0f784f848695da25ae5dbd2a4bdee15 Mon Sep 17 00:00:00 2001 From: Per Junel Date: Fri, 20 Sep 2019 00:55:34 +0200 Subject: [PATCH 1/2] Added a Dockerfile and updated the README on how to build and run with Docker. --- Dockerfile | 21 +++++++++++++++++++++ README.rst | 25 +++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..55c0a85 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM ubuntu:18.04 + +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + gcc \ + less \ + libparted0-dev \ + libudev1 \ + libudev-dev \ + make \ + udev + +COPY . /f3 + +WORKDIR /f3 + +RUN make install + +RUN make install-extra + +CMD less README.rst diff --git a/README.rst b/README.rst index 7e821a6..a6fcbcf 100644 --- a/README.rst +++ b/README.rst @@ -53,6 +53,31 @@ Use f3probe's output to determine the parameters for i3fix:: # ./f3fix --last-sec=16477878 /dev/sdb +Docker +====== + +Instead of building and installing the tools, and their depending packages, in your local OS, +the tools can be run from a Docker container. + +The included Dockerfile installs all tools, both the base tools, and the extras. + +Build +----- + +To create a Docker image, run:: + + $ docker build -t f3:latest . + +Running +------- + +Since we're dealing with attached devices, Docker needs to run in privileged mode:: + + $ docker run -it --rm --privileged -v : f3:latest [] + +The commands, and their parameters, are as otherwise described in this document. +Since the commands are installed, they should not be prefixed with the dot-slash notation. + Installation ============ From 04845023bef4317355fa2788f30e06ff3ea94830 Mon Sep 17 00:00:00 2001 From: Per Junel Date: Fri, 20 Sep 2019 23:39:51 +0200 Subject: [PATCH 2/2] Added link to Docker Hub. --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index a6fcbcf..7e8a9bd 100644 --- a/README.rst +++ b/README.rst @@ -78,6 +78,9 @@ Since we're dealing with attached devices, Docker needs to run in privileged mod The commands, and their parameters, are as otherwise described in this document. Since the commands are installed, they should not be prefixed with the dot-slash notation. +A pre-built `image `__ is available over at Docker Hub, +ready to be used. + Installation ============