Closed xuecangqiuye closed 4 years ago
I can't reproduce
$ docker pull openjdk:11.0.7-jre-slim
11.0.7-jre-slim: Pulling from library/openjdk
54fec2fa59d0: Pull complete
b7dd01647a92: Pull complete
793cbc6f8a59: Pull complete
50a0e9985dcd: Pull complete
Digest: sha256:678022f7c59cae7d1afddfc800356611bdedf1030d94cfc503a60a0757d97b79
Status: Downloaded newer image for openjdk:11.0.7-jre-slim
docker.io/library/openjdk:11.0.7-jre-slim
$ docker run -it --rm openjdk:11.0.7-jre-slim bash
root@fe61a362470e:/# apt-get update
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [121 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [197 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7905 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7380 B]
Fetched 8345 kB in 2s (3956 kB/s)
Reading package lists... Done
Network is unreachable
would be an issue on the host's end
You could also try asking over at the Docker Community Forums, Docker Community Slack, or Stack Overflow. Since these repos aren't really a user-help forum
In openjdk:11.0.7-jre-slim's container can not use
apt-get update
I use following cmd:
Seems to be a connection problem, so i change /etc/apt/sources.list, and run again:
I google this problem, use
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
can slove this problem.BUT
I need apt-get install gnupg!!!! This is an endless loop!!! please tell me, how do I use
apt-get update
after changing the /etc/apt/sources.list???