Deffiss / testenvironment-docker

MIT License
117 stars 30 forks source link

Binds during container creation #80

Closed zordark closed 1 year ago

zordark commented 1 year ago

Good day, In the older versions, you had the possibility to provide a list of Binds (mounts) when a container was created. So I could mount some files or folders to a container (eg, it is very useful with databases when you have a sample data set, or when you need to provide some configs and etc.) It was something like this

protected override CreateContainerParameters GetCreateContainerParameters(string[] environmentVariables)
{
    var parameters = base.GetCreateContainerParameters(environmentVariables);
    if (_binds != null && _binds.Any())
        parameters.HostConfig.Binds = _binds;

    return parameters;
}

I updated to the latest version and now I don't see this option, or maybe it was moved somewhere else Could you provide some directions on how to do this now? Thank you in advance.

Deffiss commented 1 year ago

Hi @zordark Right, seems like now it is not exposed so we need to address this and release a new version. Currently I am thinking about two options:

We'll do our best to add the desired functionality in upcoming days. For now, please advise which option you prefer.

Deffiss commented 1 year ago

81

Deffiss commented 1 year ago

81 is too brave, will introduce quick fix in #82 first