Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
szabgab committed Jun 9, 2023
1 parent 272edbe commit d965896
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docker/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,23 @@ docker run --rm busybox echo hello world
docker container ls -a # the container was not left around
```

## Run container mount external disk
{id: run-container-mound-external-disk}


```
docker run --rm "-v%CD%:/opt" -w /opt -it busybox
```

* -w to set the default workdir inside the container
* -v to mount an external folder to an internal folder
* %CD% is the current folder in Windows (outside)
* /opt is the folder inside
* We need double-quotes around it as the currecnt working directory on windows can contain spaces and other special characters.
* --rm to remove the container at the end of the run
* -it interactive mode


## List and remove images
{id: list-and-remove-images}
{i: images}
Expand Down

0 comments on commit d965896

Please sign in to comment.