running docker in node
peacocksir
HOBBYOP

3 months ago

railway doesn't support multi level containers, therefore you cant run docker code in a node app, but what if i use a module such as https://github.com/apocas/dockerode ? i assume it would work but i want to save myself hours of work before so does anyone know if railway would still block it?

heres a example of the code

```js
const Docker = require('dockerode');
const docker = new Docker();

const container = await docker.createContainer({
// settings
});

await container.start();```

Solved

8 Replies

peacocksir
HOBBYOP

3 months ago

i asked chat and he said

Your code uses dockerode to create Docker containers, but Railway (a managed hosting platform) does not provide direct Docker daemon access. This is the main blocker. Railway cannot execute Docker-in-Docker operations, so all your code execution will fail.

but i dont want to just give up hope now so if someone could confirm that would be good


3 months ago

chat is right


peacocksir
HOBBYOP

3 months ago

damnit


peacocksir
HOBBYOP

3 months ago

no workaround i presume?


3 months ago

yep


peacocksir
HOBBYOP

3 months ago

alright, thanks


3 months ago

np <:salute:1137099685417451530>


Status changed to Solved peacocksir 3 months ago


3 months ago

Keep an eye on our changelog, we will eventually support this with our upcoming VM runtime and the docker extension for that.


Loading...