Added a Dockerfile and updated the README on how to build and run with Docker.

This commit is contained in:
Per Junel 2019-09-20 00:55:34 +02:00
parent 9c343a1b82
commit 54672797e0
2 changed files with 46 additions and 0 deletions

21
Dockerfile Normal file
View File

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

View File

@ -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 <device>:<device> f3:latest <f3-command> [<f3-options>] <device>
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
============