non root user
This commit is contained in:
parent
3e4e3820ff
commit
c2ddb4a738
2 changed files with 12 additions and 1 deletions
|
@ -22,7 +22,8 @@ RUN pacman -Sy --noconfirm archlinux-keyring && \
|
||||||
python-mutagen
|
python-mutagen
|
||||||
|
|
||||||
COPY --from=builder /app/target/release/hoard /hoard
|
COPY --from=builder /app/target/release/hoard /hoard
|
||||||
|
COPY ./entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
CMD ["/hoard"]
|
CMD ["/bin/bash", "/entrypoint.sh"]
|
||||||
|
|
10
entrypoint.sh
Normal file
10
entrypoint.sh
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "Creating User ${UID:-1000}"
|
||||||
|
usermod -u "${UID:-1000}" hoard || exit 1
|
||||||
|
|
||||||
|
chown -R hoard /downloads
|
||||||
|
mkdir /.cache && chown -R hoard /.cache
|
||||||
|
chown -R hoard /download.db
|
||||||
|
|
||||||
|
su hoard -c /hoard
|
Loading…
Reference in a new issue