Skip to content

Info about accessing the network under WSL2 #114

@tostt

Description

@tostt

This is not really a bug report, but more a suggestion.
I encountered a network issue under WSL2 which I fixed by modifying the docker-compose file.

On WSL2, when initially running docker compose --profile auto up --build I got a network access problem:

#0 0.595 Cloning into 'repositories/stable-diffusion'...
#0 5.636 fatal: unable to access 'https://github.com/CompVis/stable-diffusion.git/': Could not resolve host: github.com

The fix was to add (in the docker-compose file) a network key to each service which has a build section.

As an example (for the download service) :
Before change:

build: ./services/download/

After change:

build:
  context: ./services/download/
  network: "host"

This fix could either be documented in the wiki or implemented in the docker-compose YAML file. For the latter, the host key could be left out to avoid any breaking changes. This way it would be easier for users to add the network key in case the problem occurs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions