-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
40 lines (31 loc) · 1.62 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM python:alpine AS venv
RUN set -ex; \
apk --update upgrade; \
apk --update add --no-cache python3-dev py3-pillow py3-ruamel.yaml libmagic ffmpeg git gcc zlib-dev jpeg-dev musl-dev libffi-dev openssl-dev libwebp-dev
RUN python -m venv --copies /app/venv; \
. /app/venv/bin/activate; \
pip3 install git+https://github.com/QQ-War/efb-telegram-master.git; \
pip3 install ehforwarderbot python-telegram-bot; \
pip3 install git+https://github.com/0honus0/python-comwechatrobot-http.git; \
pip3 install git+https://github.com/0honus0/efb-wechat-comwechat-slave.git; \
pip3 install git+https://github.com/QQ-War/efb-keyword-reply.git; \
pip3 install git+https://github.com/QQ-War/efb_message_merge.git; \
pip3 install urllib3==1.26.15; \
pip3 install --no-deps --force-reinstall Pillow; \
pip3 install --ignore-installed PyYAML TgCrypto
FROM python:alpine AS prod
LABEL org.opencontainers.image.source https://github.com/0honus0/efb-wechat-comwechat-slave
ENV LANG C.UTF-8
ENV TZ Asia/Shanghai
COPY --from=venv /app/venv /app/venv/
ENV PATH /app/venv/bin:$PATH
COPY config-example.yaml /root/.ehforwarderbot/profiles/default/config.yaml
RUN set -ex; \
apk --update upgrade; \
apk --update add --no-cache tzdata libmagic ffmpeg; \
rm -rf /tmp/* /var/cache/apk/* /var/lib/apk/lists/*; \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime; \
echo "Asia/Shanghai" > /etc/timezone; \
mkdir -p /root/.ehforwarderbot/profiles/default/blueset.telegram /root/.ehforwarderbot/modules/
VOLUME /root/.ehforwarderbot/profiles/default/blueset.telegram
ENTRYPOINT ["ehforwarderbot"]