Skip to content

[Docker] Unexpected default HOSTNAME is container's hostname #68

@leverglowh

Description

@leverglowh

This is a very interesting project!

Took me a while to get this up and running, a couple of issues I encountered:

  1. By using the env variable named HOSTNAME, docker will automatically populate it with the Hostname assigned to the container, this means that if we don't pass it to the run command (or in compose) it will be a 12 char random string causing the BE to print:
# From docker inspect, it shows: "Hostname": "400c894dc66d"
KoInsight back-end is running on [http://400c894dc66d:3000⁠](http://400c894dc66d:3000/)

Somewhat related to this issue on documentation: #64

  1. I then set 127.0.0.1 manually as hostname, but I couldn't access the web interface, doing a curl it gave me connection reset error:
> curl http://localhost:3000
curl: (56) Recv failure: Connection reset by peer

To fix this I had to set hostname as 0.0.0.0, to allow all connections.
With these changes I was able to host it and serve it with nginx!

So anyway I think maybe we can add a line in Dockerfile to set default HOSTNAME?

ENV HOSTNAME=0.0.0.0

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