Skip to content

Instantly share code, notes, and snippets.

@juanonsoftware
Last active September 19, 2020 08:42
Show Gist options
  • Select an option

  • Save juanonsoftware/e0cc504c9f51f548a87bc56a6c9e633e to your computer and use it in GitHub Desktop.

Select an option

Save juanonsoftware/e0cc504c9f51f548a87bc56a6c9e633e to your computer and use it in GitHub Desktop.
This file contains some common PowerShell commands to work with Docker
# Remove ALL containers
docker ps -a -q | % { docker rm $_ }
# Stop and then remove all RUNNING containers
docker ps -q | % { docker stop $_; docker rm $_ }
# Dockerfile command to create a L drive from C:\Logs folder
RUN Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices' -Name 'L:' -Value '\??\C:\Logs' -Type String;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment