~dricottone/huttese

ref: cca3438daed384a0d00059775881a964b69ddeb0 huttese/sr/Dockerfile.aarch64 -rw-r--r-- 1.4 KiB
cca3438dDominic Ricottone Final 1 year, 5 months ago
                                                                                
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
FROM alpine:3.17

# apk
COPY pkg /var/huttese-apk
COPY etc/apk/repositories.aarch64 /etc/apk/repositories
COPY etc/apk/keys/*.rsa.pub /etc/apk/keys/
RUN apk add --no-cache py3-srht postfix meta.sr.ht git.sr.ht todo.sr.ht supervisor nginx fcgiwrap spawn-fcgi git-daemon py3-gunicorn openssh

# supervisor
RUN mkdir /var/log/supervisord

# nginx
COPY etc/nginx/*.conf /etc/nginx/
COPY etc/nginx/http.d/*.conf /etc/nginx/http.d/
COPY --chown=nginx:nginx usr/share/nginx/html/index.html /usr/share/nginx/html/index.html

# postfix
RUN mkdir /etc/postfix/sasl && chmod 700 /etc/postfix/sasl
COPY etc/postfix/main.cf etc/postfix/master.cf etc/postfix/transport etc/postfix/generic /etc/postfix/
COPY etc/postfix/sasl/sasl_passwd /etc/postfix/sasl/sasl_passwd
RUN postmap /etc/postfix/transport \
	&& postmap /etc/postfix/generic \
	&& postmap /etc/postfix/sasl/sasl_passwd

# sshd
COPY etc/ssh/* /etc/ssh/
RUN touch /var/log/gitsrht-shell && chmod 666 /var/log/gitsrht-shell \
	&& touch /var/log/gitsrht-update-hook && chmod 666 /var/log/gitsrht-update-hook \
	&& chmod 600 /etc/ssh/*_key \
	&& chmod 644 /etc/ssh/*_key.pub

# sourcehut
VOLUME /var/lib/git
RUN chown git:git /var/lib/git
COPY etc/sr.ht/config.ini etc/sr.ht/pgp.key etc/sr.ht/pgp.pubkey /etc/sr.ht/

# run
USER root
EXPOSE 22
EXPOSE 80
EXPOSE 443
COPY etc/supervisor/conf.d/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
CMD ["/usr/bin/supervisord","-c","/etc/supervisor/conf.d/supervisord.conf"]