metube/Dockerfile

37 lines
862 B
Docker
Raw Normal View History

2022-01-25 22:20:30 +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
2019-11-29 20:44:49 +00:00
FROM python:3.8-alpine
WORKDIR /app
2022-06-19 19:15:42 +00:00
COPY Pipfile* docker-entrypoint.sh ./
2019-11-29 20:44:49 +00:00
2022-06-19 19:15:42 +00:00
RUN chmod +x docker-entrypoint.sh && \
2022-08-13 13:54:47 +00:00
apk add --update ffmpeg aria2 coreutils shadow su-exec && \
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/*
2019-11-29 20:44:49 +00:00
COPY favicon ./favicon
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
2019-11-29 20:44:49 +00:00
VOLUME /downloads
EXPOSE 8081
2022-06-19 19:15:42 +00:00
CMD [ "./docker-entrypoint.sh" ]