metube/Dockerfile

41 lines
1.1 KiB
Docker
Raw Permalink Normal View History

2024-04-12 06:19:12 +00:00
FROM node:lts-alpine as builder
2019-11-29 20:44:49 +00:00
WORKDIR /metube
COPY ui ./
2021-07-24 22:31:58 +00:00
RUN npm ci && \
2022-06-23 20:30:09 +00:00
node_modules/.bin/ng build --configuration production
2019-11-29 20:44:49 +00:00
2022-06-19 19:15:42 +00:00
2023-12-09 04:35:31 +00:00
FROM python:3.11-alpine
2019-11-29 20:44:49 +00:00
WORKDIR /app
COPY Pipfile* docker-entrypoint.sh ./
2019-11-29 20:44:49 +00:00
# Use sed to strip carriage-return characters from the entrypoint script (in case building on Windows)
# Install dependencies
RUN sed -i 's/\r$//g' docker-entrypoint.sh && \
chmod +x docker-entrypoint.sh && \
2023-06-03 18:26:23 +00:00
apk add --update ffmpeg aria2 coreutils shadow su-exec curl && \
2022-03-10 08:22:59 +00:00
apk add --update --virtual .build-deps gcc g++ musl-dev && \
2019-11-29 20:44:49 +00:00
pip install --no-cache-dir pipenv && \
pipenv install --system --deploy --clear && \
pip uninstall pipenv -y && \
apk del .build-deps && \
rm -rf /var/cache/apk/* && \
mkdir /.cache && chmod 777 /.cache
2019-11-29 20:44:49 +00:00
COPY app ./app
COPY --from=builder /metube/dist/metube ./ui/dist/metube
2022-06-19 19:15:42 +00:00
ENV UID=1000
ENV GID=1000
ENV UMASK=022
2019-11-29 20:44:49 +00:00
ENV DOWNLOAD_DIR /downloads
ENV STATE_DIR /downloads/.metube
2023-05-09 20:10:30 +00:00
ENV TEMP_DIR /downloads
2019-11-29 20:44:49 +00:00
VOLUME /downloads
EXPOSE 8081
2022-06-19 19:15:42 +00:00
CMD [ "./docker-entrypoint.sh" ]