microsoft / Docker-PowerShell

PowerShell Module for Docker
MIT License
289 stars 87 forks source link

--build-args #179

Open Plork opened 7 years ago

Plork commented 7 years ago

Output of ipmo Docker; (module Docker).Version.ToString() (from a powershell process):

0.1.0.111

New-ContainerImage does not have an option to provide "build time" arguments. for example:

docker build -t container --build-arg https_proxy=http://proxy:3128 .\container

Same goes for the Start-Container and all other cmdlets. To provide runtime environment variables or build time ones does not exist at the moment.

jterry75 commented 7 years ago

@Plork - Took a look at this. It looks like by just exposing the ImageBuildArgs as an additional parameter set you would be able to do this. Want to take a shot at contributing it?

Plork commented 7 years ago

Well I only know Powershell and a bit of Python and no C# tho ;)

jterry75 commented 7 years ago

Ok :) I will see if we cant add this for ya

megamorf commented 7 years ago

Would that accept a hashtable or just be a string consisting of key value pairs separated by spaces?

The former would be more PowerShell-like.