forked from RoyXiang/docker-EFB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (31 loc) · 1.24 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
FROM alpine:edge
MAINTAINER Roy Xiang <[email protected]>
ENV LANG C.UTF-8
RUN apk add --update --no-cache ca-certificates
RUN set -ex \
&& apk add --no-cache --virtual .run-deps \
ffmpeg \
libmagic \
python3 \
py3-certifi \
py3-numpy \
py3-pillow \
py3-requests \
&& ln -sf "$(python3 -c 'import requests; print(requests.__path__[0])')/cacert.pem" \
"$(python3 -c 'import certifi; print(certifi.__path__[0])')/cacert.pem"
RUN set -ex \
&& apk add --update --no-cache --virtual .fetch-deps \
curl \
tar \
&& curl -L -o EFB-latest.tar.gz \
$(curl -s https://api.github.com/repos/blueset/ehForwarderBot/tags \
| grep tarball_url | head -n 1 | cut -d '"' -f 4) \
&& mkdir -p /opt/ehForwarderBot/storage \
&& tar -xzf EFB-latest.tar.gz --strip-components=1 -C /opt/ehForwarderBot \
&& rm EFB-latest.tar.gz \
&& apk del .fetch-deps
RUN set -ex \
&& pip3 install -r /opt/ehForwarderBot/requirements.txt \
&& rm -rf /root/.cache
WORKDIR /opt/ehForwarderBot
CMD ["python3", "main.py"]