File tree Expand file tree Collapse file tree 2 files changed +23
-7
lines changed Expand file tree Collapse file tree 2 files changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -15,14 +15,7 @@ hostname=kolibri
1515RUN sed -i "s/raspberrypi/${hostname}/g" /etc/hostname
1616RUN sed -i "s/raspberrypi/${hostname}/g" /etc/hosts
1717
18- # Set password for specified user (pi by default)
1918
20- echo "Changing password of pi..."
21-
22- # Redirect output to prevent echoing sensitive information to stdout
23- RUN << EOF &> /dev/null
24- bash -c "echo ${user}:kolibrifly | chpasswd"
25- EOF
2619
2720echo "Done."
2821
@@ -76,10 +69,24 @@ RUN tee /etc/default/dnsmasq <<EOF
7669DNSMASQ_EXCEPT=lo
7770EOF
7871
72+ # latest debian version seems to have this line commented
73+ RUN bash -c "sed -i 's/^#conf-dir=\\/etc\\/dnsmasq.d\\/,.*/conf-dir=\\/etc\\/dnsmasq.d\\/,*.conf/' /etc/dnsmasq.conf"
74+
7975RUN rm /etc/nginx/sites-enabled/default
8076
8177RUN systemctl enable hostapd
8278RUN systemctl enable dnsmasq
8379RUN systemctl enable nginx
80+ RUN systemctl enable ssh
81+
82+
83+ # Set kolibryfly password for specified user (pi by default)
84+ RUN bash -c 'echo pi:\$6\$OUzfiWw5K8RdwdFV\$7Skel9ojIekqNSE/KVPIhemg9D.tQqoOF2BwZwIgZ/X0CTC0MJPbcUmzvnSSE3CkBdG2zsD1rCHSQ9yQCqVfr/ > /boot/firmware/userconf.txt'
85+
86+ # avoid keyboard setup questions blocking first boot:
87+ RUN sh -c 'echo "keyboard-configuration keyboard-configuration/layout select English (US)" | sudo debconf-set-selections'
88+ RUN tee -a /boot/firmware/cmdline.txt<<EOF
89+ debconf=low
90+ EOF
8491
8592ENV DEBIAN_FRONTEND
Original file line number Diff line number Diff line change @@ -7,6 +7,15 @@ ENV DEBIAN_FRONTEND noninteractive
77
88echo "--- Using Kolibri deb"
99
10+ # Preseeding package config
11+ RUN sh -c '
12+ echo "kolibri kolibri/init boolean false" | debconf-set-selections; \
13+ echo "kolibri kolibri/user string pi" | debconf-set-selections; \
14+ echo "kolibri-server kolibri-server/port select 80" | debconf-set-selections; \
15+ echo "kolibri-server kolibri-server/zip_content_port select 81" | debconf-set-selections
16+ '
17+
18+
1019# All files copied at build stage to /pi-gen
1120INSTALL dist/*.deb /tmp/kolibri.deb
1221
You can’t perform that action at this time.
0 commit comments