You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an error with your modified version of your Dockerfile. Please stick with the suggested packages. There is no need to install libunwind explicitly, since it is a dependency of libc++1. You are specifying a version of libunwind which is not the one required by libc++1 currently. Look at the Debian packages webpage for more information.
I haven't written out everything I've tried, all of the changes to dockerfiles would probably blow through the character limit on a GitHub comment.
I have of course tried your dockerfile with no luck. Anything I try throws back the error while loading shared libraries: libunwind.so.1: cannot open shared object file: No such file or directory error.
You said to use M1. That could explain why you are having different results. Have you just tried to build the Dockerfile within the repository I linked? Do you get the very same error even when using that repository and the hello world files?
Ah, adding libunwind-13 gives me a different error:
/app/node_modules/@cloudflare/workerd-linux-arm64/bin/workerd: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /app/node_modules/@cloudflare/workerd-linux-arm64/bin/workerd)
/app/node_modules/@cloudflare/workerd-linux-arm64/bin/workerd: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /app/node_modules/@cloudflare/workerd-linux-arm64/bin/workerd)
/app/node_modules/@cloudflare/workerd-linux-arm64/bin/workerd: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /app/node_modules/@cloudflare/workerd-linux-arm64/bin/workerd)
Zooming out a bit, a broader problem here may be that our binary has too many dependencies on shared libraries that lack stable ABIs across distros. We should try to statically link more of these, at least in our npm releases.
When it comes to glibc specifically, though, we do need to dynamically link. Fortunately glibc has strong ABI compatibility. However, we need to make sure to link against an older version of glibc, since generally a binary will only work with the version it was linked against and newer versions, but not older ones.
Ah, adding libunwind-13 gives me a different error:
Have you installed it together with libc++1?
workerd in my container is a static binary, so I wonder what the result of ldd is on your container running on M1, giving the different requirements.
Wrangler does not work on Debian 11 , I installed clang libc++-dev libc++abi-dev by apt install command , however, does not work correctly. Please let me know, I think Debian and Ubuntu are most popular Linux OS on Interent server. Thanks.
-- log
? Compiled Worker successfully
?? wrangler 3.1.0
wrangler dev now uses local mode by default, powered by ? Miniflare and ? workerd.
To run an edge preview session for your Worker, use wrangler dev --remote
Your worker has access to the following bindings:
KV Namespaces:
KVDATA: 83e2f6aae8664bf89a......xxxxx
? Starting local server...
[mf:wrn] The latest compatibility date supported by the installed Cloudflare Workers Runtime is "2023-05-18",
but you've requested "2023-06-15". Falling back to "2023-05-18"...
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x [b] open a browser, [d] open Devtools, [c] clear console, [x] to exit x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
/home/hodota/sonicjs/node_modules/wrangler/wrangler-dist/cli.js:30632
throw a;
^
Error: write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:160:15)
at writeGeneric (node:internal/stream_base_commons:151:3)
at Socket._writeGeneric (node:net:905:11)
at Socket._write (node:net:917:8)
at writeOrBuffer (node:internal/streams/writable:391:12)
at _write (node:internal/streams/writable:332:10)
at Socket.Writable.write (node:internal/streams/writable:336:10)
at Runtime.updateConfig (/home/hodota/sonicjs/node_modules/miniflare/dist/src/index.js:5121:26)
at async Miniflare.#assembleAndUpdateConfig (/home/hodota/sonicjs/node_modules/miniflare/dist/src/index.js:9138:23)
at async Miniflare.#init (/home/hodota/sonicjs/node_modules/miniflare/dist/src/index.js:8898:5)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}
ERROR: "dev:wrangler" exited with 7.
@Karakatiza666 As of this morning, you should be able to depend on javascript-node:16-bookworm (or just 16, you might need to rebuild your container), since Codespaces just upgraded the default image ^_^
Hey! 👋 As of #793 and #800, running workerd in Docker should be much easier. Here's a Dockerfile using the latest workerd release (currently only available on npm under the beta dist-tag):
FROM node:18
WORKDIR /app
RUN npm install workerd@beta
COPY config.capnp worker.js ./
EXPOSE 8080
CMD ["./node_modules/.bin/workerd", "serve", "config.capnp"]
I'm going to close this now, and will update this comment once beta is no longer needed.
Reacted by Tom Sherman, xmflsct, John Paul Rabanal, tom-futo, EqualMa and Kacper Potyrała
going to close this now, and will update this comment once beta is no longer needed
@mrbbot I presume beta is no longer needed? Perhaps, these instructions then could make it to readme or even a GitHub Action to publish an official workerd Docker Image (though, I'm hoping, node:version itself isn't required in the final layer, but just debian/ubuntu or any other dist with the req deps like gcc)?
Activity
frafra commentedon Sep 28, 2022
This is what I am using:
tom-sherman commentedon Sep 28, 2022
I have the following Dockerfile but I get an error, running on M1 MacOS:
Any ideas?
frafra commentedon Sep 29, 2022
You removed
libc++1and added two unnecessary-devlibraries. This is why it fails.libc++1installlibunwindas requirement.tom-sherman commentedon Sep 29, 2022
@frafra I tried that, same error:
frafra commentedon Sep 29, 2022
This is an error with your modified version of your Dockerfile. Please stick with the suggested packages. There is no need to install libunwind explicitly, since it is a dependency of libc++1. You are specifying a version of libunwind which is not the one required by libc++1 currently. Look at the Debian packages webpage for more information.
I followed the Getting Started section of this repository and made a new one, with the suggested hello world example and a simple Dockefile, which works flawlessly. I would suggest you start there: https://github.com/frafra/workerd-docker
tom-sherman commentedon Sep 29, 2022
I haven't written out everything I've tried, all of the changes to dockerfiles would probably blow through the character limit on a GitHub comment.
I have of course tried your dockerfile with no luck. Anything I try throws back the
error while loading shared libraries: libunwind.so.1: cannot open shared object file: No such file or directoryerror.frafra commentedon Sep 29, 2022
You said to use M1. That could explain why you are having different results. Have you just tried to build the Dockerfile within the repository I linked? Do you get the very same error even when using that repository and the hello world files?
libunwind8 does not provide libunwind.so.1. libunwind is a requirement of libc++ only staring from Debian Bookworm (v12, current testing), but node:18 uses Debian Buster (v11, current stable). The package is named libunwind-14 in Debian Sid and libunwind-13 in Debian Buster: https://packages.debian.org/search?suite=bullseye§ion=all&arch=any&searchon=contents&keywords=libunwind.so.1.
Could it be that libunwind.so.1 is a (indirect) dependency of workerd only on M1? Try to add libunwind-13.
frafra commentedon Sep 29, 2022
I made a branch with the additional dependency: https://github.com/frafra/workerd-docker/tree/fix-missing-libunwind
tom-sherman commentedon Sep 29, 2022
Ah, adding
libunwind-13gives me a different error:Cyb3r-Jak3 commentedon Sep 30, 2022
I have a basic docker image for amd64 here: https://github.com/Cyb3r-Jak3/docker-workerd. Smaller than installing it via npm. Arm64 support is on the way.
Also, happy to merge it into this repo.
kentonv commentedon Sep 30, 2022
Zooming out a bit, a broader problem here may be that our binary has too many dependencies on shared libraries that lack stable ABIs across distros. We should try to statically link more of these, at least in our npm releases.
When it comes to glibc specifically, though, we do need to dynamically link. Fortunately glibc has strong ABI compatibility. However, we need to make sure to link against an older version of glibc, since generally a binary will only work with the version it was linked against and newer versions, but not older ones.
cc @penalosa
frafra commentedon Sep 30, 2022
Have you installed it together with
libc++1?workerd in my container is a static binary, so I wonder what the result of
lddis on your container running on M1, giving the different requirements.kentonv commentedon Sep 30, 2022
Hmm are you sure? I don't think any of our binaries are static.
frafra commentedon Oct 1, 2022
My bad, I was looking at the wrong executable:
21 remaining items
gennai3 commentedon Jun 15, 2023
Wrangler does not work on Debian 11 , I installed clang libc++-dev libc++abi-dev by apt install command , however, does not work correctly. Please let me know, I think Debian and Ubuntu are most popular Linux OS on Interent server. Thanks.
-- log
? Compiled Worker successfully
?? wrangler 3.1.0
wrangler dev now uses local mode by default, powered by ? Miniflare and ? workerd.
To run an edge preview session for your Worker, use wrangler dev --remote
Your worker has access to the following bindings:
? Starting local server...
[mf:wrn] The latest compatibility date supported by the installed Cloudflare Workers Runtime is "2023-05-18",
but you've requested "2023-06-15". Falling back to "2023-05-18"...
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x [b] open a browser, [d] open Devtools, [c] clear console, [x] to exit x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
/home/hodota/sonicjs/node_modules/wrangler/wrangler-dist/cli.js:30632
throw a;
^
Error: write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:160:15)
at writeGeneric (node:internal/stream_base_commons:151:3)
at Socket._writeGeneric (node:net:905:11)
at Socket._write (node:net:917:8)
at writeOrBuffer (node:internal/streams/writable:391:12)
at _write (node:internal/streams/writable:332:10)
at Socket.Writable.write (node:internal/streams/writable:336:10)
at Runtime.updateConfig (/home/hodota/sonicjs/node_modules/miniflare/dist/src/index.js:5121:26)
at async Miniflare.#assembleAndUpdateConfig (/home/hodota/sonicjs/node_modules/miniflare/dist/src/index.js:9138:23)
at async Miniflare.#init (/home/hodota/sonicjs/node_modules/miniflare/dist/src/index.js:8898:5)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}
ERROR: "dev:wrangler" exited with 7.
huw commentedon Jun 15, 2023
@Karakatiza666 As of this morning, you should be able to depend on
javascript-node:16-bookworm(or just16, you might need to rebuild your container), since Codespaces just upgraded the default image ^_^mrbbot commentedon Jun 30, 2023
Hey! 👋 As of #793 and #800, running
workerdin Docker should be much easier. Here's aDockerfileusing the latestworkerdrelease (currently only available on npm under thebetadist-tag):I'm going to close this now, and will update this comment once
betais no longer needed.ignoramous commentedon Dec 3, 2025
@mrbbot I presume beta is no longer needed? Perhaps, these instructions then could make it to readme or even a GitHub Action to publish an official workerd Docker Image (though, I'm hoping,
node:versionitself isn't required in the final layer, but justdebian/ubuntuor any other dist with the req deps like gcc)?fix(server): facet channel UaF after alarm timeout
fix(server): facet channel UaF after alarm timeout
Pin a declared length on a compressed TypeScript streams response
Pin a declared length on a compressed TypeScript streams response
Pin a declared length on a compressed TypeScript streams response
Enforce a declared expectedLength's underflow on consumption
Pin a declared length on a compressed TypeScript streams response
Enforce a declared expectedLength's underflow on consumption
Report no declared length for a read or encoded legacy stream
Report no declared length for a read or encoded legacy stream