Giter Club home page Giter Club logo

Comments (14)

philjones88 avatar philjones88 commented on May 25, 2024 1

I'm hitting this too but with:

Version 17.06.0-rc1-ce-mac13 (18169)
Channel: edge
2425473dc2
{ Error: (HTTP code 400) unexpected - starting container with non-empty request body was deprecated since v1.10 and removed in v1.12
    at /Users/phil/Documents/Projects/bot/node_modules/docker-modem/lib/modem.js:239:17
    at getCause (/Users/phil/Documents/Projects/bot/node_modules/docker-modem/lib/modem.js:269:7)
    at Modem.buildPayload (/Users/phil/Documents/Projects/bot/node_modules/docker-modem/lib/modem.js:238:5)
    at IncomingMessage.<anonymous> (/Users/phil/Documents/Projects/bot/node_modules/docker-modem/lib/modem.js:214:14)
    at emitNone (events.js:110:20)
    at IncomingMessage.emit (events.js:207:7)
    at endReadableNT (_stream_readable.js:1045:12)
    at _combinedTickCallback (internal/process/next_tick.js:102:11)
    at process._tickCallback (internal/process/next_tick.js:161:9)
  reason: undefined,
  statusCode: 400,
  json: { message: 'starting container with non-empty request body was deprecated since v1.10 and removed in v1.12' } }
const container = this.dockerode.getContainer(myName);

container.attach({
    stream: true,
    stdout: true,
    stdin: true,
    stderr: true
}, (attachError, stream) => {
    container.modem.demuxStream(stream, process.stdout, process.stderr);
});

container.start({ }, (error, result) => {
    if (error) {
        console.error('Docker => error', error);
        reject(error);
    }

    console.log('Docker => finished');

    container.wait((waitError, waitResult) => {
        if (waitError) {
            console.error('Docker =>wait error', waitError);
        }

        console.log('Docker => wait finished');
    });
});

from docker-modem.

apocas avatar apocas commented on May 25, 2024 1

from docker-modem.

apocas avatar apocas commented on May 25, 2024

I'm yet to publish #78

Not sure if not using chunked with POST might be a problem for this other issue :/

from docker-modem.

rmg avatar rmg commented on May 25, 2024

Ah, hadn't seen that one yet. I'll check my app against master and see if that's enough.

from docker-modem.

rmg avatar rmg commented on May 25, 2024

Oh, I was already testing against master, nevermind.

from docker-modem.

apocas avatar apocas commented on May 25, 2024
   if (data !== '{}' && data !== '""') {
      optionsf.headers['Content-Type'] = 'application/json';
    } else {
      data = undefined;
    }

Something is weird. With this fix, run exec test fails with 500 and "{"message":"EOF"}"
This endpoint likes {} instead :/

Using what's in master right now, I can start a container without options.

from docker-modem.

rmg avatar rmg commented on May 25, 2024

Strange, my app uses exec and has no issues with it. Are you specifying any options to force it open? My app uses AttachStdin: true on the container.exec() and stdin: true, hijack: true on the exec.start.

from docker-modem.

rmg avatar rmg commented on May 25, 2024

This is probably relevant:

$ docker version
Client:
 Version:      17.06.0-ce-rc1
 API version:  1.30
 Go version:   go1.8.1
 Git commit:   7f8486a
 Built:        Wed May 31 02:56:01 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      17.06.0-ce-rc1
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.1
 Git commit:   7f8486a
 Built:        Wed May 31 03:00:14 2017
 OS/Arch:      linux/amd64
 Experimental: true

from docker-modem.

apocas avatar apocas commented on May 25, 2024

Ah I'm not yet on the rc.
Will bump my version and test again.

from docker-modem.

apocas avatar apocas commented on May 25, 2024

How do I easily install that version? (latest stable is: 17.05.0-ce -- API version: 1.29)

There was a dev repo, but now with all this constant renaming/rebrand/product mess I can't find it in docs.

from docker-modem.

rmg avatar rmg commented on May 25, 2024

I'm using docker-for-mac and there's a toggle for switching between "edge" and "stable" for updates.

from docker-modem.

apocas avatar apocas commented on May 25, 2024

Same setup as you.
Version: 17.06.0-ce-rc1
API version: 1.30

It's not the version but the options you are using. If you do not attach to stdin it fails.

https://github.com/apocas/dockerode/blob/master/test/container.js#L547 this test without stdin fails.

from docker-modem.

georgehdd avatar georgehdd commented on May 25, 2024

Hey, do you know when a release with this fix will be published to npm?

from docker-modem.

apocas avatar apocas commented on May 25, 2024

Published.

from docker-modem.

Related Issues (20)

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.