add non root user make everything related to the application belongs to that user. Huge thanks to @whlsxl as I learned a lot from his code changes but I didn't use custom docker image

This commit is contained in:
2019-07-16 23:17:43 +10:00
parent d83b9d5084
commit 6b434869c3
3 changed files with 21 additions and 4 deletions
+5 -4
View File
@@ -11,8 +11,9 @@ ENV ARIA2_USER=user
ENV ARIA2_PWD=password
ENV SSL=false
RUN apk update \
&& apk add wget bash curl openrc gnupg aria2 tar --no-cache \
RUN adduser -D -u 1000 junv \
&& apk update \
&& apk add runit wget bash curl openrc gnupg aria2 tar --no-cache \
&& curl https://getcaddy.com | bash -s personal \
&& curl -fsSL https://filebrowser.xyz/get.sh | bash \
&& wget -N https://bin.equinox.io/c/ekMN3bCZFUn/forego-stable-linux-amd64.tgz \
@@ -21,7 +22,7 @@ RUN apk update \
&& mkdir -p /usr/local/www \
&& mkdir -p /usr/local/www/aria2
ADD aria2c.sh caddy.sh Procfile /app/
ADD aria2c.sh caddy.sh Procfile init.sh start.sh /app/
ADD conf /app/conf
ADD Caddyfile SecureCaddyfile /usr/local/caddy/
@@ -44,4 +45,4 @@ VOLUME /data
EXPOSE 80 443
CMD ["./forego", "start" ]
CMD ["./start.sh"]