ytdlbot/Dockerfile

18 lines
615 B
Docker
Raw Normal View History

2021-12-09 20:09:09 +08:00
FROM python:3.9-alpine as builder
2021-05-03 19:26:47 +08:00
2021-05-04 11:30:22 +08:00
RUN apk update && apk add --no-cache tzdata alpine-sdk libffi-dev ca-certificates
2021-05-03 19:26:47 +08:00
ADD requirements.txt /tmp/
2021-05-04 11:30:22 +08:00
RUN pip3 install --user -r /tmp/requirements.txt && rm /tmp/requirements.txt
2021-12-09 20:09:09 +08:00
FROM python:3.9-alpine
2021-12-29 16:57:06 +08:00
WORKDIR /ytdlbot/ytdlbot
2021-08-20 23:48:56 +08:00
ENV TZ=Asia/Shanghai
2022-01-03 10:26:03 +08:00
RUN apk update && apk add --no-cache ffmpeg vnstat git
2021-05-04 11:30:22 +08:00
COPY --from=builder /root/.local /usr/local
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
2021-08-14 17:57:42 +08:00
COPY . /ytdlbot
2021-05-03 19:26:47 +08:00
2021-12-29 16:57:06 +08:00
CMD ["/usr/local/bin/supervisord", "-c" ,"/ytdlbot/conf/supervisor.conf"]