Is it possible to change the docker run deploy command?

I'd like to change it to docker run --rm --init --ulimit memlock=-1:-1 jarredsumner/bun:edge to support Bun as a JS runtime on railway
31 Replies
JustJake
JustJake2y ago
We have many that use Bun on Railway. Shouldn’t need to change the ulimit memlock for it to work
Harris
Harris2y ago
Oh interesting, I haven't tried my project yet but milo was mentioning that the memlock bug prevents it from working properly on railway https://discord.com/channels/713503345364697088/1020034124326641804/1020035062772809728
JustJake
JustJake2y ago
Oh? CC @salvage I think that’s unrelated we had some old hosts that have since been decommissioned If not, would love more info so we can fix it
Harris
Harris2y ago
GitHub
GitHub - Milo123459/bun-railway
Contribute to Milo123459/bun-railway development by creating an account on GitHub.
Harris
Harris2y ago
I got the memlock issue
#11 [stage-0 7/8] RUN --mount=type=cache,id=s/3e3ebc25-e30d-4ad1-a02c-2543dfc5b325-/root/bun,target=/root/.bun bun i --no-save
#11 sha256:43954de8009dea5d7066f4fb5b4e1fa892fe0da7cb0fc40e03318ccc45cfc002

#11 0.611 error: memlock limit exceeded
#11 0.611
#11 0.611 To fix this error: please increase the memlock limit or upgrade to Linux kernel 5.11+
#11 0.611
#11 0.611 If Bun is running inside Docker, make sure to set the memlock limit to unlimited (-1)
#11 0.611
#11 0.611 docker run --rm --init --ulimit memlock=-1:-1 jarredsumner/bun:edge
#11 0.611
#11 0.611 To bump the memlock limit, check one of the following:
#11 0.611 /etc/security/limits.conf
#11 0.611 /etc/systemd/user.conf
#11 0.611 /etc/systemd/system.conf
#11 0.611
#11 0.611 You can also try running bun as root.
#11 0.611
#11 0.611 If running many copies of Bun via exec or spawn, be sure that O_CLOEXEC is set so
#11 0.611 that resources are not leaked when the child process exits.
#11 0.611
#11 0.611 Why does this happen?
#11 0.611
#11 0.611 Bun uses io_uring and io_uring accounts memory it
#11 0.611 needs under the rlimit memlocked option, which can be
#11 0.611 quite low on some setups (64K).
#11 0.611
#11 [stage-0 7/8] RUN --mount=type=cache,id=s/3e3ebc25-e30d-4ad1-a02c-2543dfc5b325-/root/bun,target=/root/.bun bun i --no-save
#11 sha256:43954de8009dea5d7066f4fb5b4e1fa892fe0da7cb0fc40e03318ccc45cfc002

#11 0.611 error: memlock limit exceeded
#11 0.611
#11 0.611 To fix this error: please increase the memlock limit or upgrade to Linux kernel 5.11+
#11 0.611
#11 0.611 If Bun is running inside Docker, make sure to set the memlock limit to unlimited (-1)
#11 0.611
#11 0.611 docker run --rm --init --ulimit memlock=-1:-1 jarredsumner/bun:edge
#11 0.611
#11 0.611 To bump the memlock limit, check one of the following:
#11 0.611 /etc/security/limits.conf
#11 0.611 /etc/systemd/user.conf
#11 0.611 /etc/systemd/system.conf
#11 0.611
#11 0.611 You can also try running bun as root.
#11 0.611
#11 0.611 If running many copies of Bun via exec or spawn, be sure that O_CLOEXEC is set so
#11 0.611 that resources are not leaked when the child process exits.
#11 0.611
#11 0.611 Why does this happen?
#11 0.611
#11 0.611 Bun uses io_uring and io_uring accounts memory it
#11 0.611 needs under the rlimit memlocked option, which can be
#11 0.611 quite low on some setups (64K).
#11 0.611
JustJake
JustJake2y ago
Interesting. Need more info and a much more clear bug report on buns side. Exposing any functionality is going to be subject to security review
nebula
nebula2y ago
i think you just need to upgrade the kernel on those hosts
JustJake
JustJake2y ago
The builders are running very new kernels 5.9+
nebula
nebula2y ago
Linux kernel 5.11+
JustJake
JustJake2y ago
Fkn hell
nebula
nebula2y ago
💀
JustJake
JustJake2y ago
K probably won’t happen for a bit then. At one point this worked.
nebula
nebula2y ago
buns just using a ton of new stuff ig
JustJake
JustJake2y ago
Yea I’ve mentioned it to Jarred before but compatibility is make or break
Want results from more Discord servers?
Add your server