You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
I could access internet in my VScode dev container yesterday, but not today. I checked the host machine (Ec2 instance) can access internet without problem by running
curl -Is www.google.com | head -n 1
> HTTP/1.1 200 OK
Yet in the dev container, it hangs due to no access to internet.
So I decided to rebuild the dev container, without any change to my .devcontainer/devcontainer.json and made no change to my Dockerfile, but rebuild started to fail due to no access to internet (My Dockerfile needs internet to install some packages, my postCreateCommand needs internet to install Python packages): .devcontainer/devcontainer.json:
ARG VARIANT=3.8
FROM mcr.microsoft.com/devcontainers/python:0-${VARIANT}
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install -y libsasl2-modules libsasl2-dev
Is this related to new release of VScode? How to fix it to be able to access internet inside dev container during Dockerfile build, and also post build?
I tried removing "runArgs": [ "--network", "host"] but it also results in failure to build the dev container.
The text was updated successfully, but these errors were encountered:
Same thing started happening to me today. Running Debian 12 Bookworm as the host, I can build the image by hand by running docker build, but building through VSCode seems to fail with a network error. Very strange, and I'm pulling my hair out trying to get this working as I need to work... I also had --network host included in my runArgs. Did you ever find a solution to this?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I could access internet in my VScode dev container yesterday, but not today. I checked the host machine (Ec2 instance) can access internet without problem by running
Yet in the dev container, it hangs due to no access to internet.
So I decided to rebuild the dev container, without any change to my
.devcontainer/devcontainer.json
and made no change to myDockerfile
, but rebuild started to fail due to no access to internet (My Dockerfile needs internet to install some packages, my postCreateCommand needs internet to install Python packages):.devcontainer/devcontainer.json
:and
Dockerfile
:Is this related to new release of VScode? How to fix it to be able to access internet inside dev container during Dockerfile build, and also post build?
I tried removing
"runArgs": [ "--network", "host"]
but it also results in failure to build the dev container.The text was updated successfully, but these errors were encountered: