Docker updates

- Updates Docker base image from Ubuntu 18.04 (now EOL) to Ubuntu 22.04
  (current LTS release)
- Adds Makefile target to build Docker image. Especially useful since
  recommended Docker image `peron/f3` is out of date (as of May 2023)
- Updates README self-built Docker image usage instructions
This commit is contained in:
James Tooze 2023-05-05 10:38:37 -07:00
parent 53b682aba8
commit 09ffcd6d1a
No known key found for this signature in database
GPG Key ID: 676B55E7B4896375
3 changed files with 17 additions and 2 deletions

View File

@ -1,10 +1,10 @@
FROM ubuntu:18.04
FROM ubuntu:22.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc \
less \
libparted0-dev \
libparted-dev \
libudev1 \
libudev-dev \
make \

View File

@ -20,6 +20,9 @@ endif
all: $(TARGETS)
extra: $(EXTRA_TARGETS)
docker:
docker build -f Dockerfile -t f3:latest .
install: all
$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
$(INSTALL) -m755 $(TARGETS) $(DESTDIR)$(PREFIX)/bin

View File

@ -202,9 +202,21 @@ For example, to probe a drive mounted at /dev/sdX::
Optionally, you can also build your own container *if* you don't want to use the
pre-built image. From this directory, run::
make docker
or::
docker build -t f3:latest .
To run f3 commands using your newly built Docker image::
docker run -it --rm --device <device> f3:latest <f3-command> [<f3-options>] <device>
docker run -it --rm --device /dev/sdX f3:latest f3probe --destructive --time-ops /dev/sdX
docker run -it --rm -v /path/to/mounted/device:/mnt/ f3:latest f3write /mnt/
docker run -it --rm -v /path/to/mounted/device:/mnt/ f3:latest f3read /mnt/
Drive Permissions / Passthrough
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~