2021-05-03 19:26:47 +08:00
|
|
|
FROM python:alpine as builder
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
FROM python:alpine
|
2021-05-05 12:07:03 +08:00
|
|
|
RUN apk update && apk add --no-cache ffmpeg 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-05-03 19:26:47 +08:00
|
|
|
COPY . /ytdl-bot
|
2021-05-05 12:07:03 +08:00
|
|
|
RUN cd /ytdl-bot && git submodule update --init --recursive && apk del git
|
2021-05-03 19:26:47 +08:00
|
|
|
|
|
|
|
WORKDIR /ytdl-bot
|
|
|
|
ENV TZ=Asia/Shanghai
|
2021-05-04 16:53:21 +08:00
|
|
|
CMD ["python", "ytdl.py"]
|