Fix CD drive permission issue with Docker (on ArchLinux)

Fixes #499.

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
This commit is contained in:
JoeLametta
2020-08-10 13:59:34 +00:00
parent 0ffa34bc98
commit 8676e254e2
2 changed files with 5 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
FROM debian:buster
ARG optical_gid
RUN apt-get update && apt-get install --no-install-recommends -y \
autoconf \
@@ -51,8 +52,10 @@ RUN curl -o - 'https://ftp.gnu.org/gnu/libcdio/libcdio-paranoia-10.2+2.0.1.tar.b
RUN ldconfig
# add user
# add user (+ group workaround for ArchLinux)
RUN useradd -m worker -G cdrom \
&& if [ -n "${optical_gid}" ]; then groupadd -f -g "${optical_gid}" optical \
&& usermod -a -G optical worker; fi
&& mkdir -p /output /home/worker/.config/whipper \
&& chown worker: /output /home/worker/.config/whipper
VOLUME ["/home/worker/.config/whipper", "/output"]

View File

@@ -82,7 +82,7 @@ Please note that, right now, Docker Hub only builds whipper images for the `amd6
Alternatively, in case you prefer building Docker images locally, just issue the following command (it relies on the [Dockerfile](https://github.com/whipper-team/whipper/blob/develop/Dockerfile) included in whipper's repository):
`docker build -t whipperteam/whipper .`
`optical_gid=$(getent group optical | cut -d: -f3) docker build --build-arg optical_gid -t whipperteam/whipper .`
It's recommended to create an alias for a convenient usage: