Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start/run container with -i option #224

Open
marcuslindblom opened this issue Jul 3, 2017 · 3 comments
Open

Start/run container with -i option #224

marcuslindblom opened this issue Jul 3, 2017 · 3 comments
Labels

Comments

@marcuslindblom
Copy link

I'm using the following code to create my CreateContainerParameters

Config createContainerParameters = new Config {
  Image = "911fc62f478e",
  ArgsEscaped = false,
  AttachStderr = false,
  AttachStdin = true,
  AttachStdout = true,        
  Entrypoint = new string[] { "ffprobe" },
  Cmd = new string[] {
    "-i", "pipe:0",
    "-v", "quiet",
    "-print_format", "json",
    "-select_streams", "v:0",
    "-show_entries", "stream=nb_frames"
  },
  OpenStdin = true,
  StdinOnce = true
};

I need to add the the interactive flag -i when the container runs.

I need the container command to run like this:

docker run -i --entrypoint ffprobe [COMMAND]

How can I accomplish this?

Output of dotnet --info:

.NET Command Line Tools (1.0.4)

Product Information:
 Version:            1.0.4
 Commit SHA-1 hash:  af1e6684fd

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  16.04
 OS Platform: Linux
 RID:         ubuntu.16.04-x64
 Base Path:   /usr/share/dotnet/sdk/1.0.4

What version of Docker.DotNet?:

2.124.3
@marcuslindblom
Copy link
Author

marcuslindblom commented Jul 3, 2017

Is the correct solution to use OpenStdin in my CreateContainerParameters? Anyways, it does not seem to work? How can I see the complete command sequence including run options?

@spoon252
Copy link

spoon252 commented Sep 4, 2018

I'm also interested in this option since there are a lot of CreateContainerParameters but i can't find anything that would enable -i kind of behavior like docker run -i

@jterry75
Copy link
Contributor

jterry75 commented Sep 5, 2018

This is an old repo we no longer maintain but take a look how we did it here for a sample: https://github.com/Microsoft/Docker-PowerShell/blob/0ee84f8d2a170070dc62547949a126fdcf31e071/src/Docker.PowerShell/Cmdlets/InvokeContainerImage.cs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants