Commit
+19 -19 +/-1 browse
1 | diff --git a/containers/base/Containerfile b/containers/base/Containerfile |
2 | index a0bb4d9..b505cb6 100644 |
3 | --- a/containers/base/Containerfile |
4 | +++ b/containers/base/Containerfile |
5 | @@ -1,17 +1,17 @@ |
6 | - FROM alpine:3.19.1 AS build |
7 | + FROM alpine:3 AS build |
8 | |
9 | |
10 | RUN apk add \ |
11 | - cargo rust pkgconf sqlite sassc npm \ |
12 | - openssl openssl-dev fontconfig fontconfig-dev \ |
13 | - tree-sitter-dev build-base git |
14 | + cargo rust pkgconf sqlite sassc npm \ |
15 | + openssl openssl-dev fontconfig fontconfig-dev \ |
16 | + tree-sitter-dev build-base git |
17 | |
18 | # TODO: tree-sitter-diff needs APK support but they haven't cut a release yet |
19 | WORKDIR /src |
20 | |
21 | RUN \ |
22 | - git clone https://github.com/the-mikedavis/tree-sitter-diff.git \ |
23 | - && cd tree-sitter-diff && abuild-tree-sitter build && abuild-tree-sitter install |
24 | + git clone https://github.com/the-mikedavis/tree-sitter-diff.git \ |
25 | + && cd tree-sitter-diff && abuild-tree-sitter build && abuild-tree-sitter install |
26 | |
27 | RUN adduser -D -s /bin/sh -h /home/builder builder |
28 | |
29 | @@ -35,37 +35,37 @@ RUN scripts/ensure_database.sh ayllu |
30 | |
31 | # build the main Ayllu binary |
32 | RUN cargo build \ |
33 | - --color=never --locked --frozen --offline --release --package ayllu |
34 | + --color=never --locked --frozen --offline --release --package ayllu |
35 | |
36 | # build the Quipu binary |
37 | RUN cargo build \ |
38 | - --color=never --locked --frozen --offline --release --package quipu |
39 | + --color=never --locked --frozen --offline --release --package quipu |
40 | |
41 | FROM alpine:3.19.1 |
42 | |
43 | RUN apk add \ |
44 | - fontconfig font-misc-misc git git-daemon libgit2-dev sqlite \ |
45 | - tree-sitter-grammars # all of the syntax highlighting available in alpine |
46 | + fontconfig font-misc-misc git git-daemon libgit2-dev sqlite \ |
47 | + tree-sitter-grammars # all of the syntax highlighting available in alpine |
48 | |
49 | COPY --from=build --chown=0:0 /home/builder/src/target/release/ayllu /usr/bin/ |
50 | COPY --from=build --chown=0:0 /home/builder/src/target/release/quipu /usr/bin/ |
51 | COPY --from=build --chown=0:0 /home/builder/src/ayllu/themes /usr/lib/ayllu/themes |
52 | COPY --from=build --chown=0:0 /home/builder/src/ayllu/migrations /usr/lib/ayllu/migrations/ayllu |
53 | |
54 | - COPY --from=build --chown=0:0 /usr/lib/tree-sitter /usr/lib/ |
55 | - COPY --from=build --chown=0:0 /usr/lib/libtree-sitter* /usr/lib/ |
56 | - COPY --from=build --chown=0:0 /usr/share/tree-sitter /usr/lib/ |
57 | + COPY --from=build --chown=0:0 /usr/lib/tree-sitter/diff.so /usr/lib/tree-sitter/diff.so |
58 | + COPY --from=build --chown=0:0 /usr/share/tree-sitter/queries/diff /usr/share/tree-sitter/queries/diff |
59 | + RUN ln -sv /usr/lib/tree-sitter/diff.so /usr/lib/libtree-sitter-diff.so |
60 | |
61 | - # this container supports running Ayllu as root and non-root depending on the |
62 | + # this container supports running Ayllu as root and non-root depending on the |
63 | # desired runtime security and required UID/GID mapping. |
64 | RUN adduser -D -s /bin/sh -h /home/ayllu ayllu |
65 | |
66 | # NOTE: this explicitly ignores CVE 2022-24765 because this is not a multi-user |
67 | # git environment. |
68 | RUN \ |
69 | - mkdir -p /etc/ayllu /var/lib/ayllu /var/lib/git && \ |
70 | - ayllu config generate > /etc/ayllu/config.toml && \ |
71 | - fc-cache -fv # update font cache which is required by plotters.rs |
72 | + mkdir -p /etc/ayllu /var/lib/ayllu /var/lib/git && \ |
73 | + ayllu config generate > /etc/ayllu/config.toml && \ |
74 | + fc-cache -fv # update font cache which is required by plotters.rs |
75 | |
76 | # default to the non-root ayllu user |
77 | USER ayllu |
78 | @@ -73,7 +73,7 @@ WORKDIR /home/ayllu |
79 | |
80 | # same git config as above but as the Ayllu user |
81 | RUN \ |
82 | - git config --global --add user.name 'ayllu' && \ |
83 | - git config --global --add safe.directory '*' |
84 | + git config --global --add user.name 'ayllu' && \ |
85 | + git config --global --add safe.directory '*' |
86 | |
87 | CMD ["/usr/bin/ayllu", "serve"] |