Last active
March 3, 2022 10:37
-
-
Save alecthegeek/e0674af5f17e55bba9ab5505a4eae83b to your computer and use it in GitHub Desktop.
Runs a Dot net development env
This file contains 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
#!/usr/bin/env bash | |
docker container run --rm -it --user $(id -u):$(id -g) \ | |
--mount "type=bind,source=$PWD,target=/testproj" \ | |
--workdir /testproj --env HOME=/testproj/dotnetcache mcr.microsoft.com/dotnet/sdk:6.0 "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For PowerShell
Function dotnet {
&"docker.exe" container run --rm -it --user "$(wsl -e id -u):$(wsl -e id -g)"
--mount "type=bind,source=$PWD,target=/testproj"
--workdir /testproj --env HOME=/testproj/dotnetcache mcr.microsoft.com/dotnet/sdk:6.0 dotnet $args}