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:
@@ -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"]
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user