-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
72 lines (66 loc) · 1.79 KB
/
Dockerfile
File metadata and controls
72 lines (66 loc) · 1.79 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FROM python:3-slim-buster
RUN apt update && apt upgrade -y && \
apt install --no-install-recommends -y \
coreutils \
bash \
# build-base \
# bzip2-dev \
curl \
figlet \
gcc \
g++ \
git \
sudo \
util-linux \
# libevent \
# jpeg-dev \
libffi-dev \
# libpq \
libwebp-dev \
libxml2 \
libxml2-dev \
libxslt-dev \
# linux-headers \
musl \
# openssl-dev \
postgresql \
postgresql-client \
# postgresql-dev \
openssl \
pv \
jq \
wget \
# freetype \
# freetype-dev \
python3 \
python3-dev \
# readline-dev \
sqlite \
ffmpeg \
w3m \
# libjpeg-turbo-dev \
# sqlite-dev \
libc-dev \
chromium \
# chromium-chromedriver \
# zlib-dev \
# jpeg \
musl-dev \
atomicparsley \
neofetch \
&& rm -rf /var/lib/apt/lists /var/cache/apt/archives /tmp
COPY . /usr/src/app/OpenUserBot/
WORKDIR /usr/src/app/OpenUserBot/
# "Dirty Fix" for Heroku Dynos to track updates via 'git'.
# Fork/Clone maintainers may change the clone URL to match
# the location of their repository. [#ThatsHerokuForYa!]
RUN if [ ! -d /usr/src/app/OpenUserBot/.git ] ; then \
git clone "https://github.com/mkaraniya/OpenUserBot.git" /tmp/dirty/OpenUserBot/ && \
mv -v -u /tmp/dirty/OpenUserBot/.git /usr/src/app/OpenUserBot/ && \
rm -rf /tmp/dirty/OpenUserBot/; \
fi
# Install PIP packages
RUN python3 -m pip install --no-warn-script-location --no-cache-dir --upgrade -r requirements.txt
# Cleanup
RUN rm -rf /var/lib/apt/lists /var/cache/apt/archives /tmp
ENTRYPOINT ["python", "-m", "userbot"]