-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
65 lines (56 loc) · 1.3 KB
/
Dockerfile
File metadata and controls
65 lines (56 loc) · 1.3 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
# We're using Alpine stable
FROM alpine:edge
#
# We have to uncomment Community repo for some packages
#
RUN sed -e 's;^#http\(.*\)/v3.9/community;http\1/v3.9/community;g' -i /etc/apk/repositories
# Installing Python
RUN apk add --no-cache --update \
git \
dash \
libffi-dev \
openssl-dev \
bzip2-dev \
zlib-dev \
readline-dev \
sqlite-dev \
build-base \
python3 \
redis \
libxslt-dev \
libxml2 \
libxml2-dev \
py-pip \
libpq \
build-base \
linux-headers \
jpeg-dev \
curl \
neofetch \
sudo \
gcc \
python-dev \
python3-dev \
musl \
sqlite \
figlet \
libwebp-dev
RUN pip3 install --upgrade pip setuptools
# Copy Python Requirements to /app
RUN sed -e 's;^# \(%wheel.*NOPASSWD.*\);\1;g' -i /etc/sudoers
RUN adduser userbot --disabled-password --home /home/userbot
RUN adduser userbot wheel
USER userbot
RUN mkdir /home/userbot/userbot
RUN git clone -b master https://github.com/baalajimaestro/Telegram-UserBot /home/userbot/userbot
WORKDIR /home/userbot/userbot
#
#Copies session and config(if it exists)
#
COPY ./userbot.session ./config.env* /home/userbot/userbot/
#
# Install requirements
#
RUN sudo pip3 install -r requirements.txt
RUN sudo chmod -R 777 /home/userbot/userbot
CMD ["dash","init/start.sh"]