Skip to content

Commit

Permalink
updated dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
luisguillenc committed Mar 19, 2020
1 parent f11693a commit 7d05c83
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG arch=amd64
RUN apk update && apk add --no-cache git make ca-certificates && update-ca-certificates

# create user for service
RUN adduser -D -g '' xlist
RUN adduser -D -g 'luids' luxlist

WORKDIR /app
## dependences
Expand All @@ -26,12 +26,11 @@ LABEL maintainer="Luis Guillén Civera <luisguillenc@gmail.com>"
COPY --from=build-env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build-env /etc/passwd /etc/passwd

COPY --from=build-env /app/bin/xlistc /bin/
COPY --from=build-env /app/bin/xlistd /bin/
COPY --from=build-env /app/configs/docker/* /etc/luids/xlist/
COPY --from=build-env /app/bin/xlist? /bin/
COPY --from=build-env /app/configs/docker/xlistd/* /etc/luids/xlist/

USER xlist
USER luxlist

EXPOSE 5801
VOLUME [ "/etc/luids/xlist", "/var/lib/luids/xlist" ]
CMD [ "/bin/xlistd" ]
VOLUME [ "/etc/luids", "/var/lib/luids/xlist" ]
CMD [ "/bin/xlistd", "--config", "/etc/luids/xlist/xlistd.toml" ]
16 changes: 9 additions & 7 deletions Dockerfile.xlget
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ LABEL maintainer="Luis Guillén Civera <luisguillenc@gmail.com>"
RUN apk update && apk add --no-cache ca-certificates && update-ca-certificates

# create user for service
RUN adduser -D -g '' xlist && \
mkdir -p /var/lib/xlist && \
chown xlist /var/lib/xlist
RUN adduser -D -g 'luids' luxlist && \
mkdir -p /var/lib/luids/xlist && \
chown luxlist /var/lib/luids/xlist && \
mkdir -p /var/cache/luids/xlist && \
chown luxlist /var/cache/luids/xlist

COPY --from=build-env /app/bin/xlget /bin/
COPY --from=build-env /app/configs/empty.json /etc/xlist/sources.d/
COPY --from=build-env /app/configs/docker/xlget/* /etc/luids/xlist/

USER xlist
USER luxlist

VOLUME [ "/etc/xlist/sources.d", "/var/lib/xlist" ]
VOLUME [ "/etc/luids", "/var/lib/luids/xlist" ]

CMD [ "/bin/xlget", "--auto", "-S", "/etc/xlist/sources.d", "--xlget.output", "/var/lib/xlist", "--xlget.cache", "/var/lib/xlist/.cache" ]
CMD [ "/bin/xlget", "--auto", "--config", "/etc/luids/xlist/xlget.toml" ]
1 change: 1 addition & 0 deletions configs/docker/xlget/sources.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[ ]
4 changes: 4 additions & 0 deletions configs/docker/xlget/xlget.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[xlget]
files = [ "/etc/luids/xlist/sources.json" ]
output = "/var/lib/luids/xlist"
cache = "/var/cache/luids/xlist"
File renamed without changes.
File renamed without changes.

0 comments on commit 7d05c83

Please sign in to comment.