-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (26 loc) · 1.53 KB
/
Dockerfile
File metadata and controls
35 lines (26 loc) · 1.53 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
###############################################################################
# $ID: Dockerfile, 05 Feb 2021 11:41, Leonid 'n3o' Knyazev $
###############################################################################
FROM alpine:latest
RUN apk update && apk add --no-cache --virtual .builddeps tar bison gcc g++ linux-headers make mariadb-dev tzdata cvs\
&& mkdir -p /src/sql 2>/dev/null && cd /src \
&& echo -ne "\n" | cvs -d :pserver:anonymous@cvs.parser.ru:/parser3project login \
&& cvs -d :pserver:anonymous@cvs.parser.ru:/parser3project get -r release_3_5_0 parser3 \
&& cvs -d :pserver:anonymous@cvs.parser.ru:/parser3project get sql \
&& cd /src/parser3 && ./buildall --strip --disable-safe-mode \
&& cd /src/sql/mysql && ./configure --prefix=/root/parser3install/bin && make && make install \
&& mv /root/parser3install/bin /usr/local/parser3 \
&& apk del .builddeps && cd / && rm -rf /src/ && rm -f /tmp/* \
&& mkdir -p /app/{cgi,www} 2>/dev/null
RUN apk add --no-cache mariadb-connector-c-dev libcurl libstdc++ libgcc \
&& rm -rf /tmp/* && ln -s "$(ls -1 /usr/lib/libcurl.so.* | head -1 | xargs basename)" /usr/lib/libcurl.so
RUN apk add --no-cache tzdata && cp /usr/share/zoneinfo/Europe/Moscow /etc/localtime && echo "Europe/Moscow" > /etc/timezone
COPY templates/auto.p /usr/local/parser3/auto.p
COPY templates/index.html /app/www/index.html
ENV CGI_PARSER_LOG=/app/cgi/parser.log
USER nobody
WORKDIR /app/www
EXPOSE 9000
STOPSIGNAL SIGQUIT
ENTRYPOINT ["/usr/local/parser3/parser3", "-p", "9000"]
CMD ["/usr/local/parser3/parser3"]