mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-26 06:30:58 +03:00
Merge branch 'master' of https://github.com/Tzahi12345/YoutubeDL-Material into subscriptions-custom-path
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
FROM alpine:3.12
|
||||
|
||||
ENV UID=1000 GID=1000
|
||||
RUN export user=youtube \
|
||||
&& addgroup -S $user -g $GID && adduser -D -S $user -G $user -u $UID
|
||||
USER $user
|
||||
ENV UID=1000 \
|
||||
GID=1000 \
|
||||
USER=youtube
|
||||
|
||||
RUN addgroup -S $USER -g $GID && adduser -D -S $USER -G $USER -u $UID
|
||||
|
||||
RUN apk add --no-cache \
|
||||
ffmpeg \
|
||||
@@ -14,12 +15,13 @@ RUN apk add --no-cache \
|
||||
atomicparsley
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --chown=$UID:$GID [ "package.json", "package-lock.json", "/app/" ]
|
||||
RUN npm install
|
||||
|
||||
RUN npm install && chown -R $UID:$GID ./
|
||||
|
||||
COPY --chown=$UID:$GID [ "./", "/app/" ]
|
||||
|
||||
EXPOSE 17442
|
||||
|
||||
ENTRYPOINT [ "/app/entrypoint.sh" ]
|
||||
CMD [ "node", "app.js" ]
|
||||
|
||||
@@ -1745,7 +1745,10 @@ async function autoUpdateYoutubeDL() {
|
||||
resolve(true);
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
.catch(err => {
|
||||
logger.error('Failed to check youtube-dl version for an update.')
|
||||
logger.error(err)
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ if [ "${1#-}" != "$1" ]; then
|
||||
fi
|
||||
|
||||
# chown current working directory to current user
|
||||
if [ "$@" = "$CMD" ] && [ "$(id -u)" = "0" ]; then
|
||||
if [ "$*" = "$CMD" ] && [ "$(id -u)" = "0" ]; then
|
||||
find . \! -user "$UID" -exec chown "$UID:$GID" -R '{}' +
|
||||
exec su-exec "$UID:$GID" "$0" "$@"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user