r/SystemAdministration

▲ 0 r/SystemAdministration+1 crossposts

Running Firefox in Docker on Windows 10 LTSC 1809 – performance issues, outdated Docker version, and scheduled container resets

Hey everyone, I've been setting up a kiosk-style browser for hotel reception PCs and after a lot of trial and error I finally got it working. I wanted to share my setup and ask a couple of questions about performance and scheduled resets.

My current setup:

I'm running Windows 10 LTSC 1809 with Docker Desktop using Hyper-V as the backend (WSL2 is not available on this build, the option is greyed out). Firefox runs inside a jlesage/firefox container, accessible via localhost:5801 in the local browser. The profile is stored in RAM using --tmpfs /config so everything gets wiped when the container is destroyed.

This is the .ps1 script triggered by a desktop shortcut:

powershell

docker stop firefox-kiosk
docker rm firefox-kiosk
docker run --tmpfs /config:rw,noexec,nosuid,size=512m -p 5801:5800 --name firefox-kiosk -d jlesage/firefox
Stop-Process -Name firefox -Force -ErrorAction SilentlyContinue
Start-Sleep 6
Start-Process "C:\Program Files\Mozilla Firefox\firefox.exe" "-no-remote -new-instance http://localhost:5801"

The shortcut runs this silently via:

powershell.exe -WindowStyle Hidden -ExecutionPolicy Bypass -File "C:\Tools\firefox-docker.ps1"

Every time the shortcut is used, the old container is destroyed and a fresh one is created, so history, cookies and downloads are wiped automatically. It works well.

Question 1: Could Windows 10 LTSC 1809 be causing performance issues?

I've noticed the browser feels a bit slow sometimes. My theory is that Windows 10 LTSC 1809 forces Docker Desktop to use an older version (mine is 20.10.21) because newer versions of Docker Desktop require a higher Windows build. Since I'm stuck on Hyper-V instead of WSL2, I'm also missing the performance improvements WSL2 provides for running Linux containers.

Is this correct? Would upgrading to Windows 10 LTSC 2021 (build 19044) noticeably improve Docker performance? Has anyone benchmarked Docker on Hyper-V vs WSL2 for this kind of use case?

Question 2: How to automatically wipe the container on a schedule, not just on shortcut launch?

Right now the container only gets wiped when the user clicks the shortcut again. If a user leaves the browser open for hours without closing it, the session keeps accumulating data.

I want to set up an automatic reset every X minutes or hours, for example every 30 minutes, so even if no one touches the shortcut the container gets destroyed and recreated on a schedule.

My idea would be to use Windows Task Scheduler to run the .ps1 script periodically, but I'm not sure if that would cause issues if the user is actively browsing when the reset happens, since it would kill Firefox mid-session.

Has anyone implemented something like this? Is Task Scheduler the right approach or is there a cleaner way, maybe using Docker itself to handle the scheduled restart? Any advice on how to handle the case where a user is actively browsing when the reset triggers would be appreciated too.

Thanks in advance!

reddit.com
u/Hot-Display-77 — 2 days ago