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..7e8a9bd 100644 --- a/README.rst +++ b/README.rst @@ -53,6 +53,34 @@ 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. + +A pre-built `image `__ is available over at Docker Hub, +ready to be used. + Installation ============