Avoid using magic in /boot to make changes
This commit is contained in:
parent
1339481e56
commit
3c6eb79834
|
@ -50,11 +50,17 @@ RUN sed -i 's/gb/us/' /etc/default/keyboard
|
||||||
# Set up wifi by getting raspberry pi os to do the shim work
|
# Set up wifi by getting raspberry pi os to do the shim work
|
||||||
# @see https://core-electronics.com.au/tutorials/raspberry-pi-zerow-headless-wifi-setup.html
|
# @see https://core-electronics.com.au/tutorials/raspberry-pi-zerow-headless-wifi-setup.html
|
||||||
RUN if [ -n "$RPI_WIFI_NETWORK" ] ; then \
|
RUN if [ -n "$RPI_WIFI_NETWORK" ] ; then \
|
||||||
cp /etc/wpasupplicant/wpa_supplicant.conf /boot/ ; \
|
wpa_passphrase "$RPI_WIFI_NETWORK" "$RPI_WIFI_PASSPHRASE" >> /etc/wpa_supplicant.conf ; \
|
||||||
wpa_passphrase "$RPI_WIFI_NETWORK" "$RPI_WIFI_PASSPHRASE" > /boot/wpa_supplicant.conf ; \
|
|
||||||
touch /boot/ssh ; \
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Enable SSH access
|
||||||
|
RUN systemctl enable ssh
|
||||||
|
|
||||||
|
# Remove the resize on boot
|
||||||
|
RUN sed -i 's#/usr/lib/raspi-config/init_resize.sh#/sbin/init#' /boot/cmdline.txt
|
||||||
|
RUN sed -i 's/fsck.repair=yes//' /boot/cmdline.txt
|
||||||
|
RUN update-rc.d resie2fs_once remove && rm /etc/init.d/resize2fs_once
|
||||||
|
|
||||||
# Change pi user's password
|
# Change pi user's password
|
||||||
RUN if [ -n "$RPI_PASSWORD" ] ; then echo "pi:${RPI_PASSWORD}" | chpasswd ; fi
|
RUN if [ -n "$RPI_PASSWORD" ] ; then echo "pi:${RPI_PASSWORD}" | chpasswd ; fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue