The Tinker Dad | How To Speed Up Your Raspberry Pi Docker Host Easily? @TheTinkerDad | Uploaded September 2020 | Updated October 2024, 3 minutes ago.
#RaspberryPi #Docker #HomeServer
Running Docker containers on a Raspberry Pi? Cool! Running Docker containers off of an SD card and with low memory? Not cool! Let's see, what can we about speeding things up WITHOUT having to rebuild/reinstall your host.
Commands used in the video:
1) Storage creation:
* ls -l /dev/disk/by-uuid/
* mkfs.ext4 /dev/sda2
* sudo mkdir /media/storage
* sudo nano /etc/fstab
* sudo reboot
* sudo service docker stop
* sudo mv /var/lib/docker /media/storage/
* ln -s /media/storage/docker /var/lib/docker
* sudo service docker start
* docker stats
Template for extending /etc/fstab:
UUID=* /media/storage ext4 defaults,user,noatime,errors=remount-ro 0 2
2) Adding Swap / Virtual memory:
* sudo swapoff -a
* sudo dd if=/dev/zero of=/media/storage/swapfile bs=1G count=4
* sudo mkswap /media/storage/swapfile
* sudo swapon /media/storage/swapfile
If you enjoyed this video and want to see more, please consider subscribing to my channel!
My programming projects and Arduino code samples on GitHub:
- github.com/TheTinkerDad
My 3D printing Projects on Thingiverse:
- thingiverse.com/TheTinkerDad
My published Docker images on DockerHub:
- hub.docker.com/u/thetinkerdad
Also check out the social media for more info on this page, about what I'm up to, etc:
- facebook.com/TheTinkerDad
- instagram.com/thetinkerdad
- twitter.com/TheTinkerDad
#RaspberryPi #Docker #HomeServer
Running Docker containers on a Raspberry Pi? Cool! Running Docker containers off of an SD card and with low memory? Not cool! Let's see, what can we about speeding things up WITHOUT having to rebuild/reinstall your host.
Commands used in the video:
1) Storage creation:
* ls -l /dev/disk/by-uuid/
* mkfs.ext4 /dev/sda2
* sudo mkdir /media/storage
* sudo nano /etc/fstab
* sudo reboot
* sudo service docker stop
* sudo mv /var/lib/docker /media/storage/
* ln -s /media/storage/docker /var/lib/docker
* sudo service docker start
* docker stats
Template for extending /etc/fstab:
UUID=* /media/storage ext4 defaults,user,noatime,errors=remount-ro 0 2
2) Adding Swap / Virtual memory:
* sudo swapoff -a
* sudo dd if=/dev/zero of=/media/storage/swapfile bs=1G count=4
* sudo mkswap /media/storage/swapfile
* sudo swapon /media/storage/swapfile
If you enjoyed this video and want to see more, please consider subscribing to my channel!
My programming projects and Arduino code samples on GitHub:
- github.com/TheTinkerDad
My 3D printing Projects on Thingiverse:
- thingiverse.com/TheTinkerDad
My published Docker images on DockerHub:
- hub.docker.com/u/thetinkerdad
Also check out the social media for more info on this page, about what I'm up to, etc:
- facebook.com/TheTinkerDad
- instagram.com/thetinkerdad
- twitter.com/TheTinkerDad