Extended Raspberry Pi OS Lite Image based on Raspios and packaged with Packer.
This operating system is installed on my Raspberry Pi 4 and serve as a home lab server. It mainly run IaaS and APIs with Docker.
- Docker
- Portainer
- Git
- Tmux
- Vim
- Security
- SSH
- User / Password
- Key
- SSH
- Packer (1.8.x)
The image is built from the Raspios Lite Armhf 2022-09-07
See builder.pkr.hcl
Initialize the project, update dependencies
packer init config.pkr.hcl
Build the image
sudo packer build build.pkr.hcl
Once the build is finished, the image will be available in thes build
folder
as xraspios-lite.img
Build with the official Packer Docker image
Not tested !
Initialize
docker run \
-v `pwd`:/workspace -w /workspace \
-e PACKER_PLUGIN_PATH=/workspace/.packer.d/plugins \
hashicorp/packer:latest \
init .
Build
docker run \
-v `pwd`:/workspace -w /workspace \
-e PACKER_PLUGIN_PATH=/workspace/.packer.d/plugins \
hashicorp/packer:latest \
build .
Write the image to and SD card
Use Raspberry Pi Imager to configure WiFi, users and more and write to image to the card.
Check how rpi-imager write config
When rpi-imager no more needed to configure the wifi and user. TODO: Keys and no user?!
sudo dd bs=4M if=/dev/zero of=/dev/sdb oflag=sync
sudo dd bs=4M if=/path/to/image of=/dev/sdb oflag=sync