Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"moby": "true"
}
},
"runArgs": ["--network=host"],
Copy link
Member

@michaelstaib michaelstaib Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be needed as devcontainers have port forwarding builtin.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem to work for the website.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ports are forwared automatically, regardless of this setting, but connection to the website fails (endless loading) without this option.

Also removing the --host 0.0.0.0 option here does also not resolve the underlying issue of not reaching the website without "runArgs": ["--network=host"],:

"develop": "gatsby develop --verbose --host 0.0.0.0",

In that context, using "runArgs": ["--network=host"], enables you to access the website over your local network ip, to debug on actual phones instead of emulated ones.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does disable Docker's network isolation, which is a minor security consideration in a dev environment. So I am not inclined to do that and rather figure out why port forwarding is a problem.

"postCreateCommand": "./init.sh"
}
3 changes: 2 additions & 1 deletion .devcontainer/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ RUN apt-get update && apt-get install -y \
gnupg2 \
lsb-release \
software-properties-common \
openssh-server
openssh-server \
libnss3

# Configure SSH server
RUN mkdir /var/run/sshd \
Expand Down