Docker for Rob
I’ve been working talking with my brother about how to setup Ollama the easy way… yep, it just needs docker.
But before we go there, lets setup docker 😱
TL;DR
- What is docker anyways?
- Backup your stuff
- Open prompt as admin
- Install Chocolatey
- Enable WSL2
- Install Docker Desktop
- The fun bit - Test with WebTop!
What is docker anyways
A really bad analogy is its like a virtual pc.
Have you ever run linux inside QEMU or Virtual PC and then deleted the image?
Its sort-of like that, but usually without a pretty desktop.
Backup your stuff
We’re about to install wierd crap onto your PC… have you backed up recently?
Open prompt as admin
Everyone probably knows this, but this is the fastest way I know to get an admin prompt
win-r
to run- enter
cmd
(orpowershell
orpwsh
to get a powershell terminal) - Ctrl+Shift-> enter so prompt runs as admin
Install Chocolatey
Just cut/paste this into your prompt:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Make sure you close the prompt window to set … stuff
Update: Windows 10 Home Pre-reqs for Docker
Disclaimer: I havent tried this myself, but it looks like this is all you need to get it to work on Windows 10 Home!
- https://cloud.theodo.com/en/blog/docker-windows-10
Enable WSL2
run this one as admin powershell
wsl --version # is it installed?
wsl --install
wsl --version
There may be pre-requisites listed in the link… but probably not.
Install Docker Desktop
There might be other pre-reqs for docker from the link?
Anyways, run this one as admin cmd
choco install docker-desktop -y
- In your windows menu, open ‘Docker Desktop’, maybe pin it to the start.
- in your system tray is a teeny-tiny whale.
- Right click it and go to the dashboard
Test with WebTop
- https://docs.linuxserver.io/images/docker-webtop
- versions of linux instead of
latest
This is the fun bit!
docker pull lscr.io/linuxserver/webtop:latest
- this is optional, but its nice to see it download
- run this:
docker run -d --name webtop -p 3000:3000 --restart unless-stopped lscr.io/linuxserver/webtop:latest
- browse at http://localhost:3000
Yep - its a freakin’ desktop inside a container!
- Goto the docker desktop dashboard > Containers
- trashcan the
lscr.io/linuxserver/webtop
image - run the
docker run...etc
again.- it starts soooo much faster than a virtual pc!
All you ever need to know about Docker
If you find this useful, go be nice to someone. Pay it forward.
Cheers!