dotnet / dotnet/Docker.DotNet

Mounting a specific host directory

Open
#226 6 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
2.4k
Forks
416
PR merge metrics
No merged PRs in 30d

Description

I can mount a volume in a container by including in Config:
```
Volumes = new Dictionary
{ { "/stage", new object() } }
```
but is there any way to replicate mounting a specific directory from the docker host like the docker client can using:
```docker run -it -v /home/files:/stage ubuntu /bin/bash```

I've tried passing a MountPoint as the object but its ignored. I can retrieve the MountPoint using InspectContainerAsync() so guessing that is all its intended for.

The host is ubuntu 16.04 running docker 1.12.6.
I'm running my test under Visual Studio 2017 using NetCore v2.0.0preview2 and Docker.DotNet v2.124.3

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.