https://github.com/agc93/dnvm
A simple utility using Docker to recreate the magical SDK-switching abilities of the dnvm command
https://github.com/agc93/dnvm
bash docker dotnet dotnet-core
Last synced: 3 months ago
JSON representation
A simple utility using Docker to recreate the magical SDK-switching abilities of the dnvm command
- Host: GitHub
- URL: https://github.com/agc93/dnvm
- Owner: agc93
- License: mit
- Created: 2017-11-22T01:19:48.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-10-22T15:04:37.000Z (over 6 years ago)
- Last Synced: 2025-01-11T08:33:02.707Z (over 1 year ago)
- Topics: bash, docker, dotnet, dotnet-core
- Language: Shell
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dnvm
> PowerShell version is currently outdated and most likely not working. Updates coming.
A simple utility using Docker to recreate the magical SDK-switching abilities of the dnvm command
Versions are provided for Bash and Powershell (both versions should work on both Windows and *nix). Not tested on macOS.
> **NOTE**: This is not intended to be a replacement for the [`dotnet`](https://github.com/faniereynders/dotnet-sdk-helpers) [`sdk`](https://github.com/ivanstamenic/dotnet-sdk-helpers/blob/master/dotnet-sdk) commands for example. This will not manipulate your local SDKs and will spin up new containers every time it's run.
## Examples
```bash
dnvm -?
```
```powershell
get-help ./dnvm
```
Displays command help. This includes the full set of options and arguments.
```bash
dnvm
# equivalent to
dnvm latest
```
Immediately start a temporary container in the current directory using the `latest` tag. Note that we won't "re-pull" the image if you already have it locally.
```bash
dnvm 3.0
```
Immediately start in the current directory using the `3.0` SDK.
```bash
dnvm -i runtime 2.2
```
Immediately start in the current directory using the *runtime-only* 2.2 image.
```bash
dnvm -l
```
```powershell
dnvm -ListTags
```
Lists available tags, instead of starting a container.
## Known gotchas
Since we `rm` the container immediately after we finish, you can sometimes end up with a bunch of "dangling" volumes over time. Clean them up with something like `docker images -q -f dangling=true | xargs -r docker rmi` or `,@(docker images -q -f dangling=true) | %{& docker rmi $_}`