DEV Community

Cover image for Run Raspbian VM (ARM) in Docker container
corusm
corusm

Posted on • Edited on

Run Raspbian VM (ARM) in Docker container

Quick tutorial how to run Raspbian in a Docker Container.

Install Docker

Arch

yay -S docker docker-compose
Enter fullscreen mode Exit fullscreen mode

Ubuntu

curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
Enter fullscreen mode Exit fullscreen mode

Start & Enable Docker service

sudo systemctl start docker
sudo sysyemctl enable docker
Enter fullscreen mode Exit fullscreen mode

Docker Compose

docker-compose.yml

version: '3.7'
services:
   raspbian-vm:
       image: hannseman/raspbian
       container_name: raspbian-vm
       privileged: true
       ports:
         - "2222:2222"

Enter fullscreen mode Exit fullscreen mode

Run Docker-Compose

Start Service

sudo docker-compose up -d
Enter fullscreen mode Exit fullscreen mode

Stop Service

sudo docker-compose down
Enter fullscreen mode Exit fullscreen mode

Alternativly run via Docker Command

sudo docker run -it -p 2222:2222 --privileged hannseman/raspbian
Enter fullscreen mode Exit fullscreen mode

Connect to Server via SSH

ssh pi@servername.de -p 2222
Enter fullscreen mode Exit fullscreen mode

Top comments (0)