Adding non-root user

This commit is contained in:
Jonathan Ervine
2020-07-28 14:28:00 +08:00
parent 41d80d59b7
commit 9b5315ab4f
2 changed files with 9 additions and 9 deletions
+8 -8
View File
@@ -1,12 +1,15 @@
# Base on latest (edge) alpine image
FROM harbor.ervine.dev/library/x86_64/alpine/alpine:3.12
FROM harbor.ervine.dev/public/x86_64/alpine:v3.12
MAINTAINER “Jonathan Ervine” <docker@ervine.org>
LABEL maintainer="Jonathan Ervine <docker@ervine.org>"
# Install updates
ENV LANG='en_US.UTF-8' \
LANGUAGE='en_US.UTF-8' \
TERM='xterm'
TERM='xterm' \
TORRENT_USER='torrent' \
TORRENT_UID='1003' \
TORRENT_GID='1003'
RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
apk update && \
@@ -19,15 +22,12 @@ RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositorie
rmdir combustion-release && \
rm release.zip
COPY start.sh /usr/loca/bin/start.sh
#ADD UTC /etc/localtime
RUN rm -rf /var/cache/apk/*
EXPOSE 9091
VOLUME /config
USER $TORRENT_USER
CMD [ "/usr/local/bin/start.sh" ]
CMD [ "/usr/bin/transmission-daemon", "-f", "-g", "/config/" ]