Skip to content

Docker

What Where
Official Page https://www.docker.com/
Docs https://docs.docker.com/get-started/
Download https://desktop.docker.com/win/stable/Docker%20Desktop%20Installer.exe
Install choco install docker-desktop

Links:

Basics

Network issues on Windows

Network issues on Windows with Docker for Windows:

Show IP address allocated by the docker host: docker inspect -f "{{ .NetworkSettings.IPAddress }}" <docker-name>

Required port is reserved

  • Check, if your required port is reserved: netsh interface ipv4 show excludedportrange protocol=tcp
  • If it your port is in one of the ranges, stop winnat: net stop winnat
  • Do stuff that didn't work before
  • Prohibit dynamic reservation for your required port (here for example, 50051, as stated in the original question): netsh int ipv4 add excludedportrange protocol=tcp startport=50051 numberofports=1 Restart winnat: net start winnat

Stop IIS:

  • Stop IIS: iisreset /STOP

Cool things to run with docker

A list of docker containers

Powershell in Docker

Run the container

docker run -it mcr.microsoft.com/azure-powershell

Trigger script in Powershell in Docker

docker run -it -v C:\Users\username\src:/src mcr.microsoft.com/azure-powershell:3.6.1-ubuntu-18.04 pwsh -file /src/script.ps1

webtop

Sources:

docker run -d --name=webtop -e PUID=1000 -e PGID=1000 -e TZ=Europe/London -p 3000:3000 -v /home --shm-size="1gb" --restart unless-stopped ghcr.io/linuxserver/webtop

If you lose your password you can reset it by execing into the container as root:

docker exec -it webtop passwd abc

I2P

Sources:

docker pull meeh/i2p.i2p

Drawio

Sources:

docker run -it --rm --name="draw" -p 8080:8080 -p 8443:8443 fjudith/draw.io

NoteCalc

Sources:

git clone https://github.com/bbodi/notecalc3.git
cd notecalc3
docker build . --tag notecalc3
docker run --rm -d -p 5000:5000 notecalc3

Archive Box

Sources:

docker run -v $PWD:/data archivebox/archivebox init
docker run -v $PWD:/data archivebox/archivebox add 'https://0xfab1.net'
docker run -v $PWD:/data -it archivebox/archivebox manage createsuperuser
docker run -v $PWD:/data -p 8000:8000 archivebox/archivebox server 0.0.0.0:8000

Wireguard

Sources:

docker pull ghcr.io/linuxserver/wireguard

IPFS

Sources:

docker pull ipfs/go-ipfs
docker run -d --name ipfs_host -v $ipfs_staging:/export -v $ipfs_data:/data/ipfs -p 4001:4001 -p 127.0.0.1:8080:8080 -p 127.0.0.1:5001:5001 ipfs/go-ipfs:latest
docker exec ipfs_host ipfs swarm peers
docker logs -f ipfs_host

Matrix Synapse

Sources:

docker pull matrixdotorg/synapse
docker run -it --rm --mount type=volume,src=synapse-data,dst=/data -e SYNAPSE_SERVER_NAME=my.matrix.host -e SYNAPSE_REPORT_STATS=yes matrixdotorg/synapse:latest generate

Jellyfin

Sources:

docker pull jellyfin/jellyfin:latest
mkdir -p /srv/jellyfin/{config,cache}
docker run -d -v /srv/jellyfin/config:/config -v /srv/jellyfin/cache:/cache -v /media:/media --net=host jellyfin/jellyfin:latest

Nextcloud

Sources:

docker run -d -p 8080:80 nextcloud

Collabora Online

Sources:

docker run -d -p 8080:80 nextcloud

Burpsuite

docker run -d --name burpsuite -e DISPLAY -v ${HOME}:/home/burpsuite -v /tmp/.X11-unix/:/tmp/.X11-unix/ --p 8080:8080 alexandreoda/burpsuite

mitmproxy

docker run --rm -it -p 8080:8080 mitmproxy/mitmproxy

pytorch

docker run --gpus all --rm -ti --ipc=host pytorch/pytorch:latest

Archivebox

docker run -v ${PWD}/data -it archivebox/archivebox init --setup
docker run -v ${PWD}/data -p 8000:8000 archivebox/archivebox

Kali

docker pull kalilinux/kali-rolling

Croc

docker run -d -p 9009-9013:9009-9013 -e CROC_PASS='YOURPASSWORD' schollz/croc
croc --pass YOURPASSWORD --relay "localhost:9009" send file.txt

Standard Notes

docker run -d -p 3001:3001 --env-file=your-env-file standardnotes/web:stable

Windows 2000

A Docker image for Windows 2000 Advanced Server with SP4. (docker github)

docker run --detach --name qemu-win2000 --device /dev/kvm --publish 127.0.0.1:3389:3389/tcp --publish 127.0.0.1:5900:5900/tcp --publish 127.0.0.1:6080:6080/tcp docker.io/hectormolinero/qemu-win2000:latest

The instance can be accessed from:

  • RDP (3389/TCP): any RDP client, login with Administrator / password.
  • VNC (5900/TCP): any VNC client, without credentials.
  • noVNC (6080/TCP): http://127.0.0.1:6080/vnc.html
  • Shell: docker exec -it qemu-win2000 vmshell
Back to top