问题描述
我已按照here的说明从Microsoft Store安装了Ubuntu 16.04,并在Ubuntu上安装了docker。我能够使docker运行,但是当我尝试构建docker映像时,它在RUN apt-get update
步骤失败。同样,当我使用docker run -it ubuntu bash
运行Ubuntu容器时,运行apt-get update
会得到以下结果
root@266ddcbcf737:/# apt-get update Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [107 kB] Get:2 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB] Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [111 kB] Err:1 http://security.ubuntu.com/ubuntu focal-security InRelease At least one invalid signature was encountered. Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB] Err:2 http://archive.ubuntu.com/ubuntu focal InRelease At least one invalid signature was encountered. Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease At least one invalid signature was encountered. Err:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease At least one invalid signature was encountered. Reading package lists... Done W: GPG error: http://security.ubuntu.com/ubuntu focal-security InRelease: At least one invalid signature was encountered. E: The repository 'http://security.ubuntu.com/ubuntu focal-security InRelease' is not signed. N: Updating from such a repository can't be done securely,and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://archive.ubuntu.com/ubuntu focal InRelease: At least one invalid signature was encountered. E: The repository 'http://archive.ubuntu.com/ubuntu focal InRelease' is not signed. N: Updating from such a repository can't be done securely,and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://archive.ubuntu.com/ubuntu focal-updates InRelease: At least one invalid signature was encountered. E: The repository 'http://archive.ubuntu.com/ubuntu focal-updates InRelease' is not signed. N: Updating from such a repository can't be done securely,and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://archive.ubuntu.com/ubuntu focal-backports InRelease: At least one invalid signature was encountered. E: The repository 'http://archive.ubuntu.com/ubuntu focal-backports InRelease' is not signed. N: Updating from such a repository can't be done securely,and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
我尝试清除apt-cache并重新生成它,运行apt-get clean
修剪docker系统,并使用--allow-unauthenticated
,但没有任何效果。我从docker容器和ubuntu中运行了df来检查剩余空间,我的剩余空间超过20GB,这应该足够吗?可能是什么问题?
root@653e5734fa23:/# df Filesystem 1K-blocks Used Available Use% Mounted on overlay 215196196 192359380 22836816 90% / tmpfs 215196196 192359380 22836816 90% /dev tmpfs 215196196 192359380 22836816 90% /sys/fs/cgroup rootfs 215196196 192359380 22836816 90% /etc/hosts shm 215196196 192359380 22836816 90% /dev/shm root@653e5734fa23:/# exit exit me@DESKTOP:~$ df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 215196196 192358800 22837396 90% / none 215196196 192358800 22837396 90% /dev none 215196196 192358800 22837396 90% /run none 215196196 192358800 22837396 90% /run/lock none 215196196 192358800 22837396 90% /run/shm none 215196196 192358800 22837396 90% /run/user cgroup 215196196 192358800 22837396 90% /sys/fs/cgroup C:\ 215196196 192358800 22837396 90% /mnt/c
Docker信息:
me@DESKTOP~$ docker info Containers: 1 Running: 0 Paused: 0 Stopped: 1 Images: 3 Server Version: 17.09.0-ce Storage Driver: overlay2 backing Filesystem: <unkNown> Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0 runc version: 3f2f8b84a77f73d38244dd690525642a72156c64 init version: 949e6fa Kernel Version: 4.4.0-18362-Microsoft Operating System: Ubuntu 16.04.7 LTS OSType: linux Architecture: x86_64 cpus: 4 Total Memory: 15.84GiB Name: DESKTOP-DOC78SA ID: CHGU:3AXK:5MJK:XK3H:LXBS:BQJI:AGW6:SF7J:7FG3:BUBD:J55H:VXUM Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false WARNING: No memory limit support WARNING: No swap limit support WARNING: No kernel memory limit support WARNING: No oom kill disable support WARNING: No cpu cfs quota support WARNING: No cpu cfs period support WARNING: No cpu shares support WARNING: No cpuset support
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)