metube/Dockerfile

46 lines
1.2 KiB
Docker
Raw Permalink Normal View History

2024-04-12 09:19:12 +03:00
FROM node:lts-alpine as builder
2019-11-29 22:44:49 +02:00
WORKDIR /metube
COPY ui ./
2021-07-25 00:31:58 +02:00
RUN npm ci && \
2022-06-23 23:30:09 +03:00
node_modules/.bin/ng build --configuration production
2019-11-29 22:44:49 +02:00
2022-06-19 22:15:42 +03:00
2025-06-02 22:32:57 +03:00
FROM python:3.13-alpine
2019-11-29 22:44:49 +02:00
WORKDIR /app
COPY Pipfile* docker-entrypoint.sh ./
2019-11-29 22:44:49 +02: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 && \
apk add --update ffmpeg aria2 coreutils shadow su-exec curl tini && \
2022-03-10 10:22:59 +02:00
apk add --update --virtual .build-deps gcc g++ musl-dev && \
2019-11-29 22:44:49 +02: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 22:44:49 +02:00
COPY app ./app
COPY --from=builder /metube/dist/metube ./ui/dist/metube
2022-06-19 22:15:42 +03:00
ENV UID=1000
ENV GID=1000
ENV UMASK=022
2019-11-29 22:44:49 +02:00
ENV DOWNLOAD_DIR /downloads
ENV STATE_DIR /downloads/.metube
2023-05-09 16:10:30 -04:00
ENV TEMP_DIR /downloads
2019-11-29 22:44:49 +02:00
VOLUME /downloads
EXPOSE 8081
2025-06-05 20:47:49 +03:00
# Add build-time argument for version
ARG VERSION=dev
ENV METUBE_VERSION=$VERSION
ENTRYPOINT ["/sbin/tini", "-g", "--", "./docker-entrypoint.sh"]