Questions tagged [dockerode]

dockerode objectives:

streams - dockerode does NOT break any stream, it passes them to you allowing for some stream voodoo. stream demux - Supports optional demultiplexing. entities - containers, images and execs are defined entities and not random static methods. run - dockerode allow you to seamless run commands in a container ala docker run. tests - dockerode really aims to have a good test set, allowing to follow Docker changes easily, quickly and painlessly. feature-rich - There's a real effort in keeping All Docker Remote API features implemented and tested. interfaces - Features callback and promise based interfaces, making everyone happy

Installation npm install dockerode

Usage Input options are directly passed to Docker. Check Docker API documentation for more details. Return values are unchanged from Docker, official Docker documentation will also apply to them. Check the tests and examples folder for more examples.

35 questions
0
votes
1 answer

Error ERR_STREAM_WRITE_AFTER_END in Dockerode

I trigger some Docker containers with Dockerode from within a Node.js app. In some occasions in triggers the error: Error [ERR_STREAM_WRITE_AFTER_END]: write after end (see log below). Is there anything I am doing wrong? Here is Docker run code: //…
Alexis.Rolland
  • 5,724
  • 6
  • 50
  • 77
0
votes
1 answer

pass filePath to dockerfile as variable _ nodeJS dockerode Docker

In my case, I am creating a config.json that I need to copy from the host to my container. I figured out there is some option that I can pass args to my dockerfile. so first step is : 1.create Dockerfile: FROM golang WORKDIR /go/src/app COPY . . …
Babak Abadkheir
  • 2,222
  • 1
  • 19
  • 46
0
votes
1 answer

Running java code in a docker container using dockerode

I want to send some java code as a string to an API to then run it in a docker container and return the console output, I have managed to do it with Python but as java first needs to be compiled then ran I'm unsure how to implement the…
Andrew Dean
  • 195
  • 1
  • 7
  • 23
0
votes
1 answer

How to directly pass the content of dockerfile as a string to dokerode instead of passing the path of the file

dockerode api needs to be invoked with the following parameters in order to build an image from a dockerfile ex: docker.buildImage({ context: __dirname, src: ['Dockerfile'] }, { t: 'myDockerImage' }, function(error, output) { if (error) { …
isnvi23h4
  • 1,910
  • 1
  • 27
  • 45
0
votes
1 answer

Attach to running container dockerode

Trying to ssh into running container using dockerode. I want to run a container with commands like 'node dist/server.js' then after container is started ssh it into it and run bash by default. Looked at all the examples for attach a container but…
1 2
3