Thu, 23 Mar 2023 09:54:45 +0000
squishy: Add missing servercontact plugin
154
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
1 | ####### |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
2 | |
169
72d3ca5225f3
Dockerfile: update to bullseye
Matthew Wild <mwild1@gmail.com>
parents:
164
diff
changeset
|
3 | FROM debian:bullseye-slim AS squish |
150 | 4 | |
5 | MAINTAINER Matthew Wild <mwild1@gmail.com> | |
6 | ||
7 | RUN apt-get update \ | |
8 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
9 | lua5.2 \ | |
10 | lua-filesystem \ | |
11 | lua-socket \ | |
12 | lua-sec \ | |
13 | make \ | |
14 | mercurial \ | |
15 | ca-certificates \ | |
154
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
16 | bsdmainutils \ |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
17 | libidn11-dev \ |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
18 | liblua5.2-dev \ |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
19 | libssl-dev \ |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
20 | build-essential \ |
150 | 21 | && rm -rf /var/lib/apt/lists/* |
22 | ||
23 | WORKDIR /tmp/build | |
24 | ||
25 | RUN hg clone https://code.matthewwild.co.uk/squish -b lua5.2 | |
26 | ||
27 | RUN make -C squish install | |
28 | ||
29 | RUN hg clone https://hg.prosody.im/0.10 prosody | |
30 | ||
31 | RUN hg clone https://code.matthewwild.co.uk/verse | |
32 | ||
154
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
33 | RUN cd prosody && ./configure && make |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
34 | |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
35 | RUN sed -i '/util\.encodings/d' verse/squishy |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
36 | |
164
69b508f132b5
Import util.hashes from Prosody
Matthew Wild <mwild1@gmail.com>
parents:
155
diff
changeset
|
37 | RUN sed -i '/util\.hashes/d' verse/squishy |
69b508f132b5
Import util.hashes from Prosody
Matthew Wild <mwild1@gmail.com>
parents:
155
diff
changeset
|
38 | |
150 | 39 | RUN squish --prosody=./prosody verse |
40 | ||
41 | ADD . riddim | |
42 | ||
43 | RUN squish riddim | |
44 | ||
154
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
45 | ######### |
151
936364f8efcf
Dockerfile: Switch to alpine for final image
Matthew Wild <mwild1@gmail.com>
parents:
150
diff
changeset
|
46 | |
169
72d3ca5225f3
Dockerfile: update to bullseye
Matthew Wild <mwild1@gmail.com>
parents:
164
diff
changeset
|
47 | FROM debian:bullseye-slim |
154
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
48 | |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
49 | MAINTAINER Matthew Wild <mwild1@gmail.com> |
151
936364f8efcf
Dockerfile: Switch to alpine for final image
Matthew Wild <mwild1@gmail.com>
parents:
150
diff
changeset
|
50 | |
154
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
51 | RUN apt-get update \ |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
52 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
53 | lua5.2 \ |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
54 | lua-filesystem \ |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
55 | lua-socket \ |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
56 | lua-sec \ |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
57 | lua-expat \ |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
58 | ca-certificates \ |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
59 | libidn11 \ |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
60 | && rm -rf /var/lib/apt/lists/* |
150 | 61 | |
62 | WORKDIR /opt/riddim | |
63 | ||
154
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
64 | RUN mkdir -p /usr/local/lib/lua/5.2/util |
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
65 | |
150 | 66 | COPY --from=squish /tmp/build/verse.lua /opt/riddim/verse.lua |
67 | COPY --from=squish /tmp/build/riddim.lua /opt/riddim/riddim.lua | |
154
30a0af8f9999
Dockerfile: Update (now works)
Matthew Wild <mwild1@gmail.com>
parents:
151
diff
changeset
|
68 | COPY --from=squish /tmp/build/prosody/util/encodings.so /usr/local/lib/lua/5.2/util/encodings.so |
164
69b508f132b5
Import util.hashes from Prosody
Matthew Wild <mwild1@gmail.com>
parents:
155
diff
changeset
|
69 | COPY --from=squish /tmp/build/prosody/util/hashes.so /usr/local/lib/lua/5.2/util/hashes.so |
155
68ee41b41a71
Dockerfile: include util.interpolation in build
Matthew Wild <mwild1@gmail.com>
parents:
154
diff
changeset
|
70 | COPY --from=squish /tmp/build/prosody/util/interpolation.lua /usr/local/lib/lua/5.2/util/interpolation.lua |
150 | 71 | |
72 | ADD config.docker.lua /etc/riddim/config.lua | |
73 | ||
74 | ENTRYPOINT ["/usr/bin/lua5.2", "riddim.lua"] | |
75 | ||
76 | USER nobody | |
77 | ||
78 | VOLUME /etc/riddim | |
79 | ||
80 | CMD ["/etc/riddim/config.lua"] |