mirror of
https://github.com/hex-ci/smzdm_script.git
synced 2026-06-16 06:57:17 +08:00
Support docker
This commit is contained in:
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM python:alpine as builder
|
||||
|
||||
RUN apk update && apk add --no-cache tzdata alpine-sdk libffi-dev ca-certificates
|
||||
ADD requirements.txt /tmp/
|
||||
RUN pip3 install --user -r /tmp/requirements.txt && rm /tmp/requirements.txt
|
||||
|
||||
|
||||
FROM python:alpine
|
||||
WORKDIR /smzdm_bot
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
||||
RUN apk update && apk add --no-cache ffmpeg vnstat
|
||||
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
|
||||
COPY . /smzdm_bot
|
||||
|
||||
CMD ["python", "main.py"]
|
||||
Reference in New Issue
Block a user