在我的arm64机器(内核4.14)中运行docker容器,方法是 码头工人信息看起来像这样
sh-3.2# docker --version
dDocker version 18.09.1, build 4c52b90
sh-3.2# docker info
Server Version: 18.09.1
Storage Driver: overlay2
Backing Filesystem: extfs
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 local
如果我运行ubuntu 16.04 bash,
docker run -it ubuntu:16.04 /bin/bash
并使用root登录
root@2a59885d4261:~# whoami
root
但是如果我想执行apt-get更新,它将失败,
root@2a59885d4261:~# apt-get update
Reading package lists... Done
E: List directory /var/lib/apt/lists/partial is missing. - Acquire (1: Operation not permitted)
root@2a59885d4261:~# apt-get install a
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (1: Operation not permitted)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
root@2a59885d4261:~#
我无法在任何文件夹中创建任何文件
root@2a59885d4261:~# echo a > a
bash: a: Operation not permitted
root@2a59885d4261:~#
安装信息如下
root@2a59885d4261:~# mount
overlay on / type overlay (rw,relatime,lowerdir=/opt/var/lib/docker/overlay2/l/X7UNJLBP2W3SC5REV22PI52W4K:/opt/var/lib/docker/overlay2/l/UZMEZEHWGVGXMAJ4FL67DOV6UT:/opt/var/lib/docker/overlay2/l/MW6VOSQXCUYS2LCOPN4HBQSD6X:/opt/var/lib/docker/overlay2/l/VNTNU7Z52TWKMJSUWYKY2JXHY3:/opt/var/lib/docker/overlay2/l/NDC6BBFJ4UNYA75A4QMZ4RSO6Z,upperdir=/opt/var/lib/docker/overlay2/90c600bf543923e1ce3efb011af84f884ae14aae59429dc35a76f3a54c6b6ef9/diff,workdir=/opt/var/lib/docker/overlay2/90c600bf543923e1ce3efb011af84f884ae14aae59429dc35a76f3a54c6b6ef9/work)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev type tmpfs (rw,nosuid,size=65536k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666)
sysfs on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,relatime,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (ro,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (ro,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/memory type cgroup (ro,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (ro,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (ro,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (ro,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/perf_event type cgroup (ro,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/pids type cgroup (ro,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/freezer type cgroup (ro,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/debug type cgroup (ro,nosuid,nodev,noexec,relatime,debug)
cgroup on /sys/fs/cgroup/devices type cgroup (ro,nosuid,nodev,noexec,relatime,devices)
vip_cgroup on /sys/fs/cgroup/vip type cgroup (ro,nosuid,nodev,noexec,relatime,release_agent=/usr/bin/vip-release-agent,name=vip_cgroup)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
/dev/mmcblk0p11 on /etc/resolv.conf type ext4 (rw,nosuid,relatime,errors=panic,data=ordered)
/dev/mmcblk0p11 on /etc/hostname type ext4 (rw,nosuid,relatime,errors=panic,data=ordered)
/dev/mmcblk0p11 on /etc/hosts type ext4 (rw,nosuid,relatime,errors=panic,data=ordered)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
devpts on /dev/console type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666)
proc on /proc/bus type proc (ro,relatime)
proc on /proc/fs type proc (ro,relatime)
proc on /proc/irq type proc (ro,relatime)
proc on /proc/sys type proc (ro,relatime)
tmpfs on /proc/asound type tmpfs (ro,relatime)
tmpfs on /proc/keys type tmpfs (rw,nosuid,size=65536k,mode=755)
tmpfs on /proc/timer_list type tmpfs (rw,nosuid,size=65536k,mode=755)
tmpfs on /proc/timer_stats type tmpfs (rw,nosuid,size=65536k,mode=755)
tmpfs on /proc/sched_debug type tmpfs (rw,nosuid,size=65536k,mode=755)
tmpfs on /proc/scsi type tmpfs (ro,relatime)
tmpfs on /sys/firmware type tmpfs (ro,relatime)
对我有帮助吗?
答案 0 :(得分:0)
也许尝试其他容器?我在这里有一个标记为xenial
(也为16.04)的
edd@rob:~$ docker run --rm -ti ubuntu:xenial
root@95d55903caed:/# apt-get update
Get:1 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [801 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [12.7 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [545 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [6117 B]
Get:10 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [1196 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [13.1 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [953 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [19.1 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [7942 B]
Get:18 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [8532 B]
Fetched 15.7 MB in 3s (5075 kB/s)
Reading package lists... Done
root@95d55903caed:/# exit
edd@rob:~$