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

Bug: Building an image fails #137

Open
cheetahbyte opened this issue Oct 18, 2021 · 0 comments
Open

Bug: Building an image fails #137

cheetahbyte opened this issue Oct 18, 2021 · 0 comments

Comments

@cheetahbyte
Copy link

Hello, i have the problem that i can't build images with dockerode.

My Code:

client.buildImage(
  "./Dockerfile",
  {
    t: "test"
  },
  function (err, stream) {
    if (err) console.error(err);

    console.log(stream);
  }
);

My Dockerfile:

FROM alpine:latest
WORKDIR /app
COPY test.sh .
ENTRYPOINT ["sh"]
CMD ["test.sh"]

Error:

Error: (HTTP code 500) server error - unexpected EOF 
    at /home/cheetah/Schreibtisch/test.dockerapi/node_modules/docker-modem/lib/modem.js:324:17
    at IncomingMessage.<anonymous> (/home/cheetah/Schreibtisch/test.dockerapi/node_modules/docker-modem/lib/modem.js:351:9)
    at IncomingMessage.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1334:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  reason: 'server error',
  statusCode: 500,
  json: null
}

Docker logs

Okt 18 07:49:10 laptop dockerd[889]: time="2021-10-18T07:49:10.507471313+02:00" level=error msg="Handler for POST /build returned error: unexpected EOF"

There was a similar error before (#5), but I did not use any unusual characters.

I look forward to an answer, and to the solution of the problem ^^

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

No branches or pull requests

1 participant