ytdlbot/Dockerfile

16 lines
495 B
Docker
Raw Normal View History

2021-05-03 11:26:47 +00:00
FROM python:alpine as builder
2021-05-04 03:30:22 +00:00
RUN apk update && apk add --no-cache tzdata alpine-sdk libffi-dev ca-certificates
2021-05-03 11:26:47 +00:00
ADD requirements.txt /tmp/
2021-05-04 03:30:22 +00:00
RUN pip3 install --user -r /tmp/requirements.txt && rm /tmp/requirements.txt
FROM python:alpine
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 11:26:47 +00:00
COPY . /ytdl-bot
WORKDIR /ytdl-bot
ENV TZ=Asia/Shanghai
CMD ["python", "bot.py"]