-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
50 lines (40 loc) · 1.39 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
FROM debian:bullseye
WORKDIR /opt/luawiki
LABEL org.opencontainers.image.source https://github.com/LuaWiki/LuaWiki
COPY . .
COPY docker/nginx.conf conf/nginx.conf
COPY docker/local_settings.lua luawiki/local_settings.lua
RUN mkdir lib logs
RUN apt-get update && \
apt-get -y install --no-install-recommends \
curl \
gnupg \
ca-certificates \
git \
build-essential \
lua5.1 \
liblua5.1 \
&& rm -rf /var/lib/apt/lists/*
RUN curl -o- https://openresty.org/package/pubkey.gpg | apt-key add - \
&& echo "deb http://openresty.org/package/debian bullseye openresty" | tee /etc/apt/sources.list.d/openresty.list \
&& apt-get update \
&& apt-get -y install --no-install-recommends openresty
RUN git clone --depth 1 https://github.com/kikito/inspect.lua --branch v3.1.3 /tmp/inspect \
&& cp /tmp/inspect/inspect.lua /opt/luawiki/inspect.lua \
&& rm -rf /tmp/inspect
RUN git clone --depth 1 https://github.com/AlexanderMisel/LPeg /tmp/lpeg \
&& make --directory=/tmp/lpeg LUADIR="/usr/include/lua5.1" \
&& cp /tmp/lpeg/lpeg.so /opt/luawiki/lib \
&& rm -rf /tmp/lpeg
RUN apt-get -y remove \
curl \
gnupg \
ca-certificates \
build-essential \
&& apt-get -y autoremove
COPY docker/entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT [ "/docker-entrypoint.sh" ]
STOPSIGNAL SIGQUIT
EXPOSE 80/tcp
CMD [ "openresty", "-p", "/opt/luawiki", "-g", "daemon off;" ]