Commit
Author: Kevin Schoon [me@kevinschoon.com]
Hash: fbc722fccbb1bff32dac1a53f95a92dc98d06c5f
Timestamp: Sun, 28 Apr 2024 21:22:05 +0000 (11 months ago)

+8 -2 +/-3 browse
update multiuser container to grant access to ayllu
1diff --git a/containers/base/Containerfile b/containers/base/Containerfile
2index cd8dc2c..e558663 100644
3--- a/containers/base/Containerfile
4+++ b/containers/base/Containerfile
5 @@ -34,7 +34,7 @@ RUN npm install && scripts/compile_stylesheets.sh
6 FROM alpine:3.19.1
7
8 RUN apk add \
9- fontconfig font-misc-misc git libgit2-dev sqlite \
10+ fontconfig font-misc-misc git git-daemon libgit2-dev sqlite \
11 tree-sitter-grammars # all of the syntax highlighting available in alpine
12
13 COPY --from=build --chown=0:0 /home/builder/src/target/release/ayllu /usr/bin/
14 diff --git a/containers/multiuser/Containerfile b/containers/multiuser/Containerfile
15index d9e99c9..d3f9232 100644
16--- a/containers/multiuser/Containerfile
17+++ b/containers/multiuser/Containerfile
18 @@ -2,7 +2,7 @@ FROM registry.ayllu-forge.org/projects/ayllu:main
19
20 USER root
21
22- RUN apk add --no-cache gawk dropbear runit
23+ RUN apk add --no-cache acl gawk dropbear runit
24
25 COPY containers/multiuser/motd.txt /etc/motd
26 COPY containers/multiuser/service /etc/service
27 diff --git a/containers/multiuser/run_all.sh b/containers/multiuser/run_all.sh
28index ea7b797..8a37a44 100755
29--- a/containers/multiuser/run_all.sh
30+++ b/containers/multiuser/run_all.sh
31 @@ -30,6 +30,12 @@ do
32 echo "creating user $username"
33
34 adduser -h "/home/$username" -D -g "Ayllu Managed User" "$username"
35+ # create a directory called "repos" which we give full access to both the
36+ # user and Ayllu.
37+ mkdir "/home/$username/repos"
38+ chmod g+s "/home/$username/repos"
39+ setfacl -d -m g::rwx "/home/$username/repos"
40+
41 addgroup "$username" ayllu
42 mkdir -p "/home/$username/.ssh"
43 echo /dev/null > "/home/$username/.ssh/authorized_keys"