blob: 0e9443a3d6346b3b72fdd9aea5e6c32cb0e5e5c9 (
plain)
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
|
RUN pkg-install \
nginx \
apache-tools \
mjpg-streamer-pikvm \
python \
python-raspberry-gpio
RUN systemctl enable nginx
ARG KVMD_VERSION
ENV KVMD_VERSION $KVMD_VERSION
RUN echo $KVMD_VERSION
RUN pkg-install kvmd
RUN systemctl enable kvmd
COPY stages/pikvm/config.txt /boot/
COPY stages/pikvm/sysctl.conf /etc/sysctl.d/99-pikvm.conf
COPY stages/pikvm/udev.rules /etc/udev/rules.d/pikvm.rules
COPY stages/pikvm/motd /etc/
RUN sed -i -e "s/console=ttyAMA0\,115200//g" /boot/cmdline.txt \
&& sed -i -e "s/kgdboc=ttyAMA0\,115200//g" /boot/cmdline.txt
RUN systemctl mask [email protected]
RUN sed -e "s/^#PROD//g" /usr/share/kvmd/configs/nginx/nginx.conf.example > /etc/nginx/nginx.conf
RUN echo "admin:admin" > /etc/nginx/htpasswd
RUN cp /usr/share/kvmd/configs/kvmd/v1.yaml /etc/kvmd.yaml
ARG NEW_HTTPS_CERT
ENV NEW_HTTPS_CERT $NEW_HTTPS_CERT
RUN echo $NEW_HTTPS_CERT
RUN mkdir /etc/nginx/ssl \
&& cd /etc/nginx/ssl \
&& openssl req -new -x509 -nodes -newkey rsa:4096 -keyout server.key -out server.crt -days 3650 \
-subj "/C=RU/ST=Moscow/L=Moscow/O=Pi-KVM/OU=Pi-KVM/CN=localhost" \
&& chmod 400 server.key \
&& chmod 444 server.crt
|