-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
64 lines (56 loc) · 1.92 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM alpine:latest
# Install all requirements
RUN apk add --no-cache \
openssl \
perl \
curl \
gcc \
libc-dev \
libressl-dev \
make \
perl-dev \
wget \
zlib-dev \
&& curl -L https://cpanmin.us \
| perl - -M https://cpan.metacpan.org \
-n DBI \
-n DBD::SQLite \
-n Mojolicious \
-n Minion \
-n Minion::Backend::SQLite \
-n App::Prove \
-n IO::Socket::SSL \
-n Net::IDN::Encode \
-n Text::CSV \
-n Storable \
&& apk del \
zlib-dev \
wget \
perl-dev \
make \
libressl \
libc-dev \
gcc \
curl \
&& rm -rf /root/.cpanm/* /usr/local/share/man
# Copy the scanner code
COPY blacklist_checker/ /app/blacklist_checker/
# Create convenience link and create storage folder
# Check /app/blacklist_checker/etc/blacklist_checker.conf to configure another storage folder
RUN ln -s /app/blacklist_checker/script/blacklist_checker /usr/local/bin/blacklist \
&& mkdir -p /storage/blacklists
# Do not run as root but as user "mojo"
RUN addgroup mojo \
&& adduser -D -h /home/mojo -s /bin/sh -G mojo mojo \
&& chown -R mojo:mojo /app/blacklist_checker /storage
WORKDIR /home/mojo
USER mojo
# Run in production-mode (default: development)
ENV MOJO_MODE=production
# Please request an api token at https://data.phishtank.com/
# if you plan to use Phishtank regularly
ENV PHISHTANK_API=
# We're using port 8080.
# Check /app/blacklist_checker/etc/blacklist_checker.conf to configure another port
EXPOSE 8080
CMD [ "/app/blacklist_checker/script/start" ]