diff --git a/Containerfile b/Containerfile index a840817..eb8c2cc 100644 --- a/Containerfile +++ b/Containerfile @@ -41,6 +41,23 @@ RUN echo "deb https://ppa.l9o.dev/raspbian ./" | sudo tee /etc/apt/sources.list. RUN apt-get update RUN apt-get install -y mariner3d +# Quality of Life in the terminal +RUN apt-get install -y tmux + +# Convert keymap to us +RUN sed -i 's/gb/us/' /etc/default/keyboard + +# 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 +RUN if [ -n "$RPI_WIFI_NETWORK" ] ; then \ + cp /etc/wpasupplicant/wpa_supplicant.conf /boot/ ; \ + wpa_passphrase "$RPI_WIFI_NETWORK" "$RPI_WIFI_PASSPHRASE" > /boot/wpa_supplicant.conf ; \ + touch /boot/ssh ; \ + fi + +# Change pi user's password +RUN if [ -n "$RPI_PASSWORD" ] ; then echo "pi:${RPI_PASSWORD}" | chpasswd ; fi + # Clean-up RUN apt-get clean diff --git a/README.md b/README.md index 9a89abf..aa65e3f 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,19 @@ This particular image is principally aimed at the Raspberry Pi (512M original Re ``` # Creates root.tar.gz and boot.tar.gz sudo ./scripts/extract_root.sh + +# Export any settings (optional) +export RPI_WIFI_NETWORK=mywifi +export RPI_WIFI_PASSPHRASE=mywifi +export RPI_PASSWORD=raspberry + # Run the build podman build --rm=false --platform linux/armv/v7 -t localhost/pileogoo . CONTAINERID=$(podman create localhost/pileogoo /bin/bash) -podman export -o build/root.tar.gz "${CONTAINERID}" +podman export -o build/all.tar "${CONTAINERID}" + # Creates a new image from the exported copy -sudo ./scripts/extra_build.sh +sudo ./scripts/extract_build.sh rm ./build/all.tar ``` @@ -44,4 +51,3 @@ raspi1ap Raspberry Pi A+ (revision 1.1) raspi2 Raspberry Pi 2B (revision 1.1) (alias of raspi2b) raspi2b Raspberry Pi 2B (revision 1.1) ``` -