Giter Club home page Giter Club logo

posh-docker's People

Contributors

samneirinck avatar stuartleeks avatar tobper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

posh-docker's Issues

Split out ConvertFrom-Docker into separate module

Hi @samneirinck,

It would very convenient if ConvertFrom-Docker were in a separate module.

I am authoring a module, DockerHelpers, where I would like to take a dependency on posh-docker but can't as explained below.

DockerHelpers module uses ConvertFrom-Docker for some of it's implementation. But DockerHelpers should not add tab completion to the powershell console.

So currently I'm copying ConvertFrom-Docker into DockerHelpers module - not ideal for a number of reasons.

Alternatively, I'd be very happy for ConvertFrom-Docker to be contributed to DockerHelpers. Obviously that would mean posh-docker taking an external dependency. However, powershell Install/Import commands would make that transparent to the consumer of posh-docker.

If you were willing to contribute then I'd make you a contributor to DockerHelpers so that you can modify the sources.

Thanks
Christian

Add tests

Add tests to check if new functionality doesn't break older docker versions

Doc improvment

Hi ! I don't know if it is even possible, but... is there any chance to get the tab completion working through "Cmder" terminal with the docker invite added to it ? If yes, it would be helpful to find an install doc here :)

To get docker invite, here is my Cmder config :

  • Go to settings (Win+Alt+P)
  • Go to "Startup/Task"
  • Add a default task named "docker" :
    -- Task parameters : /icon "C:\Program Files\Docker Toolbox\docker-quickstart-terminal.ico" (depending of your own path)
    -- Commands :
    ""C:\Program Files\Git\bin\bash.exe" --login -i "C:\Program Files\Docker Toolbox\start.sh" -new_console:d:"C:\Program Files\Docker Toolbox"" (again, depending of your own path)

Edit :
To enable tab completion on a PowerShell invite from Cmder, you just need to remove the "-NoProfile" command option in the "Startup/Task"

But still impossible to get tab completion on the new "docker" invite, unfortunately.

No effect after installing

I tried the install instructions in your readme as well as the ones found here.

Neither method had any affect on autocompletion.

I'm on Windows 10 x64 (Build 14986) / Docker 1.13

Get-Module posh-docker returns

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     0.6.0      posh-docker                         ConvertFrom-Docker

module 'posh-docker' was not loaded

Every time I open a powershell window I get this error:

Import-Module : The specified module 'posh-docker' was not loaded because no valid module file was found in any module directory.

Any thoughts on how to make it go away?

Issue when docker containers have multiple names

Hi. Thanks for this awesome project. It works great for me, except this one thing. Some of my docker containers have multiple names. This results in the following output, when asking for the available docker container names:

C:\Users\XXX> docker ps -a --no-trunc --format "{{.Names}}"
guaccomplete_guacamole_1
guaccomplete_mysql_1,guaccomplete_guacamole_1/guaccomplete_mysql_1,guaccomplete_guacamole_1/mysql,guaccomplete_guacamole_1/mysql_1
guaccomplete_guacd_1,guaccomplete_guacamole_1/guaccomplete_guacd_1,guaccomplete_guacamole_1/guacd,guaccomplete_guacamole_1/guacd_1

Now, when I use TAB to autocomplete my container name, it will insert the whole line including all comma-separated names, which does not work.

C:\Users\XXX> docker start guaccomplete_guacd_1,guaccomplete_guacamole_1/guaccomplete_guacd_1,guaccomplete_guacamole_1/guacd,guaccomplete_guacamole_1/guacd_1
Error response from daemon: No such container: guaccomplete_guacd_1,guaccomplete_guacamole_1/guaccomplete_guacd_1,guaccomplete_guacamole_1/guacd,guaccomplete_guacamole_1/guacd_1
Error: failed to start containers: guaccomplete_guacd_1,guaccomplete_guacamole_1/guaccomplete_guacd_1,guaccomplete_guacamole_1/guacd,guaccomplete_guacamole_1/guacd_1

I guess posh-docker needs to split the container names by comma before autocompleting.

Tested using Docker version 1.11.2, build b9f10c9.

Support image names

Right now it seems to only get container names, but it would be nice to get image names for docker run, docker rmi, and any other command that works with images.
Right now, docker run will show container names if you tab, which is wrong.

Conflict with TabExpansionPlusPlus

Apparently, there is a conflict between these two modules. After installing TabExpansionPlusPlus, posh-docker stopped working. Removing Import-Module TabExpansionPlusPlus directive from PowerShell profile fixes the issue. Order of import of TabExpansionPlusPlus and posh-docker doesn't affect the problem.

Problems installing

PS C:\WINDOWS\system32> Install-Module -Scope CurrentUser posh-docker

NuGet provider is required to continue
PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories. The NuGet provider must be available in 'C:\Program Files (x86)\PackageManagement\ProviderAssemblies' or
'C:\Users\Christopher\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install and import the NuGet
provider now?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): y

PS C:\WINDOWS\system32> Import-Module posh-docker
Import-Module : The specified module 'posh-docker' was not loaded because no valid module file was found in any module directory.
At line:1 char:1
+ Import-Module posh-docker
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (posh-docker:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

Firstly, I'm a powershell virgin, though I like to think I can follow simple instructions. Please tell me what I'm doing wrong here? This is on Windows 10. I used admin PS.

tab completion for options such as --attach, --quiet not working

Great extension and I love it! The README outlines that options would be tab completable but I'm not able to get it to work.

Docker commands like start, stop etc auto complets like a charm but I'm not able to get the respective options to auto complete.

e.g. When I type docker start --att, and press tab key I should see docker start --attach but it isn't.

I'm running powershell 5 on Windows 10 ,but I've also tested this on Windows Server 2016 and also no love :(

Easier installation

Make it easier to install posh-docker, either via chocolatey or a 1 line install-command

Support new docker sub commands

The Docker client now has a new structure with sub commands.

For example:

docker container --help
docker container run ...
docker image --help
docker image ls

How can posh-docker be enhanced to support tab completion for these sub commands as well?

Is this project dead? How can we help?

Hey @samneirinck, I know a lot of docker users that would love this updated to current CLI commands and sub-commands, options, etc.

Maybe we Docker Captains can help spread the word and get you some help with fixes and new features, but I have two questions first:

  1. Are you still willing to lead this repo by accepting PR's, commenting on issues, etc? It would be great if we could use the same PowerShell Module name and repo.

  2. Can you describe a list of issues or needed features to get it working with old and new command format and options?

CC: @StefanScherer

Installation issue

Running

Install-Module -Scope CurrentUser posh-docker

yields

Install-Module : Parameter named "Scope" not found.
In Zeile:1 Zeichen:16
+ Install-Module -Scope CurrentUser posh-docker
+                ~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Install-Module], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Install-Module

Running

Install-Module posh-docker

yields

Module posh-docker was not found in central repository
In C:\Users\felix\OneDrive\Dokumente\WindowsPowerShell\Modules\PsGet\PsGet.psm1:692 Zeichen:13
+             throw "Module $Module was not found in central repository ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Module posh-doc...tral repository:String) [], RuntimeException
    + FullyQualifiedErrorId : Module posh-docker was not found in central repository

What am I missing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.