Browse Source

Adding dockerfiles

Lertsenem 4 years ago
parent
commit
071f137e93
2 changed files with 40 additions and 0 deletions
  1. 31 0
      Dockerfile
  2. 9 0
      docker.run.sh

+ 31 - 0
Dockerfile

@@ -0,0 +1,31 @@
1
+FROM perl
2
+
3
+MAINTAINER Lertsenem <lertsenem@lertsenem.com>
4
+
5
+RUN    apt update                           \
6
+    && apt install -y libcurl3-dev          \
7
+                      git                   \
8
+                      python3-pip
9
+
10
+RUN cpanm --force CGI::Fast                 \
11
+                  Data::Dumper              \
12
+                  Encode                    \
13
+                  Net::Curl                 \
14
+                  HTML::Entities            \
15
+                  HTML::TreeBuilder::LibXML \
16
+                  HTML::TreeBuilder::XPath  \
17
+                  LWP::ConnCache            \
18
+                  LWP::Protocol::Net::Curl  \
19
+                  LWP::UserAgent            \
20
+                  POSIX                     \
21
+                  Readonly
22
+
23
+RUN pip3 install requests                   \
24
+                 feedparser                 \
25
+                 Mastodon.py
26
+
27
+COPY . /root/bot
28
+
29
+WORKDIR /root/bot
30
+
31
+CMD ./docker.run.sh

+ 9 - 0
docker.run.sh

@@ -0,0 +1,9 @@
1
+#!/bin/sh
2
+
3
+while true; do
4
+
5
+    ./main.py -d /bot.data -v run
6
+
7
+    sleep 100
8
+
9
+done