Mon, 22 Nov 2021 10:39:54 +0000
Add lua-unbound
0 | 1 | #################################### |
2 | FROM debian:buster-slim as build | |
3 | ||
4 | MAINTAINER Matthew Wild <mwild1@gmail.com> | |
5 | ||
6 | RUN apt-get update \ | |
7 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
8 | lua5.2 \ | |
9 | liblua5.2-dev \ | |
10 | libidn11-dev \ | |
11 | libssl-dev \ | |
1 | 12 | libunbound-dev \ |
0 | 13 | build-essential \ |
14 | && rm -rf /var/lib/apt/lists/* | |
15 | ||
16 | WORKDIR /tmp/build | |
17 | ||
18 | ADD https://hg.prosody.im/trunk/archive/tip.tar.gz ./prosody.tar.gz | |
19 | ||
20 | RUN tar --strip-components=1 -xzf prosody.tar.gz \ | |
21 | && ./configure && make | |
22 | ||
23 | ADD src/web/ util/ | |
24 | ||
1 | 25 | ADD https://code.zash.se/dl/luaunbound/luaunbound-0.5.tar.gz ./luaunbound-0.5.tar.gz |
26 | ||
27 | RUN tar -xzf luaunbound-0.5.tar.gz \ | |
28 | && make -C luaunbound-0.5 | |
29 | ||
0 | 30 | ############################ |
31 | FROM debian:buster-slim | |
32 | ||
33 | RUN apt-get update \ | |
34 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
35 | tini \ | |
36 | lua5.2 \ | |
37 | lua-cjson \ | |
38 | lua-expat \ | |
39 | lua-filesystem \ | |
40 | lua-sec \ | |
41 | lua-socket \ | |
42 | libidn11 \ | |
43 | lua-dbi-postgresql \ | |
44 | lua-scrypt \ | |
1 | 45 | libunbound8 \ |
0 | 46 | && rm -rf /var/lib/apt/lists/* |
47 | ||
48 | COPY --from=build /tmp/build/util /usr/local/lib/lua-web-app/util | |
49 | COPY --from=build /tmp/build/net /usr/local/lib/lua-web-app/net | |
1 | 50 | COPY --from=build /tmp/build/luaunbound-0.5/lunbound.so /usr/local/lib/lua/5.2/lunbound.so |
0 | 51 | |
52 | ENV LUA_WEB_APP_FRAMEWORK /usr/local/lib/lua-web-app | |
53 | ||
54 | ADD src/ /usr/local/lib/lua-web-app | |
55 | ||
56 | WORKDIR /opt | |
57 | ||
58 | ADD default-app/html ./html | |
59 | ADD default-app/app ./app | |
60 | ||
61 | ADD config.dist.lua /etc/app/config.lua | |
62 | ||
63 | VOLUME /var/lib/app | |
64 | ||
65 | ENV LISTEN_INTERFACE * | |
66 | ENV LISTEN_PORT 8007 | |
67 | EXPOSE 8007 | |
68 | ||
69 | ENTRYPOINT ["/usr/bin/tini"] | |
70 | CMD ["/usr/bin/lua5.2", "/usr/local/lib/lua-web-app/main.lua", "/etc/app/config.lua"] |