Skip to content

Error: connect ECONNREFUSED #722

@ether-wan

Description

@ether-wan

Hello, i'm trying to launch container w/ dockerode on Mac OS

const docker = new Docker({host: 'http://0.0.0.0', port: 3000, socketPath: '/var/run/docker.sock'});

    const container = await docker.createContainer({
        Image: 'app-bot',
        HostConfig: {
            PortBindings: {
                [`${3000}/http`]: [{ HostPort: 50000 }]
            }
        }
    });
    await container.start();

I'm getting an error :

Error: connect ECONNREFUSED 0.0.0.0:3000 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16) { errno: -61, code: 'ECONNREFUSED', syscall: 'connect', address: '0.0.0.0', port: 3000 }

The docker service run with colima ( https://github.com/abiosoft/colima )

The deployment of the image works with docker run -p 50000:3000 app-bot command on the terminal

Thanks !!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions