Change keymap, add option for wifi, new password, and ssh
This commit is contained in:
		
							parent
							
								
									830b0f4870
								
							
						
					
					
						commit
						1339481e56
					
				|  | @ -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 | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										12
									
								
								README.md
								
								
								
								
							
							
						
						
									
										12
									
								
								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) | ||||
| ``` | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue