fix: mount /dev to docker container

the docker image needs to have the /dev mounted in order to properly format the disk.

Updated both the `RunD2VM` and the README instructions to reflect this

closes #18
This commit is contained in:
Bilal Shaikh 2023-02-14 20:11:15 -08:00
parent c66595115f
commit 8c5c2f679e
No known key found for this signature in database
GPG Key ID: 92D880EB16D422F0
2 changed files with 3 additions and 1 deletions

View File

@ -73,7 +73,7 @@ the directory where you run the command.*
```bash
docker pull linkacloud/d2vm:latest
alias d2vm="docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock --privileged -v \$PWD:/d2vm -w /d2vm linkacloud/d2vm:latest"
alias d2vm="docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock --privileged -v \$(pwd):/d2vm -v /dev:/dev -w /d2vm linkacloud/d2vm:latest"
```
```bash

View File

@ -137,6 +137,8 @@ func RunD2VM(ctx context.Context, image, version, in, out, cmd string, args ...s
fmt.Sprintf("%s:/in", in),
"-v",
fmt.Sprintf("%s:/out", out),
"-v",
"/dev:/dev",
"-w",
"/d2vm",
fmt.Sprintf("%s:%s", image, version),