sudo pacman -Sy docker
sudo systemctl start docker
sudo usermod -aG docker $USER
Last active
February 15, 2026 20:56
-
-
Save iegik/d2932ab62ff297f4535bde1f0d1cc94f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Node.js | |
| node () { docker run -it -u $(id -u) -v "$PWD":/usr/src/app -w /usr/src/app --rm node:4 node $@; } | |
| npm () { docker run -it -u $(id -u) -v "$PWD":/usr/src/app -v $HOME/.npm:/.npm -w /usr/src/app --rm node:4 npm $@; } |
UPDATE: Docker has security issues:
- Kernel exploits
- Denial-of-service attacks
- Container breakouts
- Poisoned images
- Compromising secrets
https://www.oreilly.com/content/five-security-concerns-when-using-docker/
docker image prune -a- Remove all unused imagesdocker images --format 'table {{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.CreatedAt}}\t{{.Size}}'- list images with their size
docker container inspect -f '{{ .NetworkSettings.IPAddress }}' CONTAINER_NAME
brew install jq
docker network inspect -f '{{json .Containers}}' bridge | \
jq '.. | if type=="object" and has("Name") then {(.Name): .IPv4Address} else empty end'
Enable-WindowsOptionalFeature -Online -FeatureName $(“Microsoft-Hyper-V”, “Containers”) -All
bcdedit /set hypervisorlaunchtype Auto
Enable-WindowsOptionalFeature -Online -FeatureName $("VirtualMachinePlatform", "Microsoft-Windows-Subsystem-Linux")
Switch to WSLv2:
wsl set-default-verion 2
wsl --unregister docker-desktop-data
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False
Set-VMProcessor DockerDesktopVM -ExposeVirtualizationExtensions $true
Invoke-WebRequest https://raw.githubusercontent.com/Microsoft/Virtualization-Documentation/master/hyperv-tools/Nested/Enable-NestedVm.ps1 -OutFile ~/Enable-NestedVm.ps1
~/Enable-NestedVm.ps1 -VmName "DockerDesktopVM"
bcdedit /set hypervisorlaunchtype Auto
net stop vmms
net start vmms
docker context update 10-box --docker "host=tcp://192.168.5.38:2376,ca=$HOME/.docker/machine/machines/10-box/ca.pem,cert=$HOME/.docker/machine/machines/10-box/cert.pem,key=$HOME/.docker/machine/machines/10-box/key.pem"
https://github.com/StefanScherer/windows-docker-machine
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment