Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpine 3.13 based images have no network access #2688

Closed
jokay opened this issue Mar 18, 2021 · 4 comments
Closed

Alpine 3.13 based images have no network access #2688

jokay opened this issue Mar 18, 2021 · 4 comments

Comments

@jokay
Copy link

jokay commented Mar 18, 2021

Describe the Bug

Using the Alpine 3.13 based images, the network access does not to work.

When using the Alpine 3.12 based images, everything works.

Steps to Reproduce

Create a container using mcr.microsoft.com/dotnet/sdk:3.1.407-alpine3.13.

Restore a project having NuGet dependencies.

Results in the following error:

Determining projects to restore...
/usr/share/dotnet/sdk/3.1.407/NuGet.targets(128,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [/app/demo.csproj]
/usr/share/dotnet/sdk/3.1.407/NuGet.targets(128,5): error :   Name does not resolve [/app/demo.csproj]

or for mcr.microsoft.com/dotnet/aspnet:3.1.13-alpine3.13 when accessing some external resource:

 ---> Running in 991c3f4e552d
fetch http://dl-3.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-3.alpinelinux.org/alpine/edge/testing: DNS lookup error
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz

Output of docker version

Docker version 20.10.5, build 55c4c88

Output of docker info

Client:
 Context:    default
 Debug Mode: false

Server:
 Containers: 6
  Running: 0
  Paused: 0
  Stopped: 6
 Images: 75
 Server Version: 20.10.5
 Storage Driver: overlay2
  Backing Filesystem: btrfs
  Supports d_type: true
  Native Overlay Diff: false
 Logging Driver: json-file
 Cgroup Driver: none
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc version: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
  rootless
 Kernel Version: 5.10.0-0.bpo.3-amd64
 Operating System: Debian GNU/Linux 10 (buster)
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 15.52GiB
 Name: ***
 ID: ***
 Docker Root Dir: /home/system/.local/share/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Registry Mirrors:
 Live Restore Enabled: true
 Product License: Community Engine
 Default Address Pools:
   Base: 172.17.0.0/12, Size: 16
   Base: 10.0.0.0/8, Size: 24
@mthalman
Copy link
Member

mthalman commented Mar 18, 2021

Have you verified that you have network connectivity just using the alpine:3.13 base image?

docker pull alpine:3.13
3.13: Pulling from library/alpine
Digest: sha256:a75afd8b57e7f34e4dad8d65e2c7ba2e1975c795ce1ee22fa34f8cf46f96a3be
Status: Image is up to date for alpine:3.13
docker.io/library/alpine:3.13docker run --rm alpine:3.13 wget https://api.nuget.org/v3/index.json
Connecting to api.nuget.org (152.199.4.184:443)
saving to 'index.json'
index.json           100% |*****************************************************************************************************************************************************************|  8543  0:00:00 ETA
'index.json' saved

@jokay
Copy link
Author

jokay commented Mar 18, 2021

Good point.. really strange 🧐

Alpine 3.13

user@host:~$ docker pull alpine:3.13
3.13: Pulling from library/alpine
ba3557a56b15: Already exists 
Digest: sha256:a75afd8b57e7f34e4dad8d65e2c7ba2e1975c795ce1ee22fa34f8cf46f96a3be
Status: Downloaded newer image for alpine:3.13
docker.io/library/alpine:3.13
user@host:~$ docker run --rm alpine:3.13 wget https://api.nuget.org/v3/index.json
wget: bad address 'api.nuget.org'

Alpine 3.12

user@host:~$ docker pull alpine:3.12
3.12: Pulling from library/alpine
f84cab65f19f: Already exists 
Digest: sha256:a295107679b0d92cb70145fc18fb53c76e79fceed7e1cf10ed763c7c102c5ebe
Status: Downloaded newer image for alpine:3.12
docker.io/library/alpine:3.12
user@host:~$ docker run --rm alpine:3.12 wget https://api.nuget.org/v3/index.json
Connecting to api.nuget.org (152.199.23.209:443)
saving to 'index.json'
index.json           100% |********************************|  8543  0:00:00 ETA
'index.json' saved

@jokay
Copy link
Author

jokay commented Mar 18, 2021

Not related to the dotnet images, issue closed.

@jokay jokay closed this as completed Mar 18, 2021
@jokay
Copy link
Author

jokay commented Mar 18, 2021

Relates alpinelinux/docker-alpine#155.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants