mstormo / docker_suse

Convenience images for various versions of SUSE which are not available from the official repo
MIT License
7 stars 4 forks source link

zypper update fail #3

Open tomxiong opened 8 years ago

tomxiong commented 8 years ago

Hi I want to build a image base on your docker_suse image , i use dockerfile to build it. And i add zypper update in dockerfile, but i got the error message like below:

RUN zypper --no-gpg-checks refresh && \
  zypper --gpg-auto-import-keys --non-interactive update  
Installing: filesystem-11.4-11.14.1 [..error]
Installation of filesystem-11.4-11.14.1 failed:
(with --nodeps --force) Error: Subprocess failed. Error: RPM failed: warning: /var/cache/zypp/packages/OSS/suse/x86_64/filesystem-11.4-11.14.1.x86_64.rpm: Header V3 RSA/SHA256 signature: NOKEY, key ID 3dbdc284
error: unpacking of archive failed on file /sys: cpio: chown failed - Read-only file system

I got the same issue while i execute "zypper in filesystem" in a container base on docker_suse image.

mstormo commented 8 years ago

Hmm, I'm not able to check this more closely until next week, but can you output /proc/mount?

If /sys is mounted 'ro', then try remounting it 'rw' and do the update.

If that works, we'll have to redo the Dockerfile, to ensure 'rw' on the mounts.

.marius

On Jul 7, 2016 11:02 AM, "tom xiong" notifications@github.com wrote:

Hi I want to build a image base on your docker_suse image , i use dockerfile to build it. And i add zypper update in dockerfile, but i got the error message like below:

Installing: filesystem-11.4-11.14.1 [..error] �[91mInstallation of filesystem-11.4-11.14.1 failed: (with --nodeps --force) Error: Subprocess failed. Error: RPM failed: warning: /var/cache/zypp/packages/OSS/suse/x86_64/filesystem-11.4-11.14.1.x86_64.rpm: Header V3 RSA/SHA256 signature: NOKEY, key ID 3dbdc284 error: unpacking of archive failed on file /sys: cpio: chown failed - Read-only file system

I got the same issue while i execute "zypper in filesystem" in a container base on docker_suse image.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mstormo/docker_suse/issues/3, or mute the thread https://github.com/notifications/unsubscribe/AAAF3KkxccVTAOGo5eZBBw3t6M7WMSzFks5qTMCFgaJpZM4JG4D2 .

tomxiong commented 8 years ago

Thank marius for you quick reply. The /sys is mounted 'ro'

0a855d05e2f4:/ # cat /proc/mounts
rootfs / rootfs rw 0 0
none / aufs rw,relatime,si=22d2618bb2e79979,dio,dirperm1 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666 0 0
sysfs /sys sysfs ro,nosuid,nodev,noexec,relatime 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,relatime,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup ro,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
cgroup /sys/fs/cgroup/cpuset cgroup ro,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup ro,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/memory cgroup ro,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/devices cgroup ro,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/freezer cgroup ro,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup ro,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/blkio cgroup ro,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/perf_event cgroup ro,nosuid,nodev,noexec,relatime,perf_event 0 0
mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
/dev/sda1 /etc/resolv.conf ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda1 /etc/hostname ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda1 /etc/hosts ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=65536k 0 0
devpts /dev/console devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
proc /proc/bus proc ro,nosuid,nodev,noexec,relatime 0 0
proc /proc/fs proc ro,nosuid,nodev,noexec,relatime 0 0
proc /proc/irq proc ro,nosuid,nodev,noexec,relatime 0 0
proc /proc/sys proc ro,nosuid,nodev,noexec,relatime 0 0
proc /proc/sysrq-trigger proc ro,nosuid,nodev,noexec,relatime 0 0
tmpfs /proc/kcore tmpfs rw,nosuid,mode=755 0 0
tmpfs /proc/timer_stats tmpfs rw,nosuid,mode=755 0 0
tmpfs /proc/sched_debug tmpfs rw,nosuid,mode=755 0 0

And i try to remount it 'rw' but got fail like below:

0a855d05e2f4:/ # mount -v -o remount=rw /sys
mount: permission denied
0a855d05e2f4:/ # mount -v remount=rw /sys   
mount: you didn't specify a filesystem type for remount=rw
       I will try all types mentioned in /etc/filesystems or /proc/filesystems
Trying vfat
Trying hfs
Trying minix
Trying reiserfs
Trying ext3
mount: permission denied

Then i try to mount tools to mount other folder but got fail like below:

0a855d05e2f4:~ # mkdir test
0a855d05e2f4:~ # mkdir /mnt/test
0a855d05e2f4:~ # pwd         
/root
0a855d05e2f4:~ # cd test
0a855d05e2f4:~/test # pwd
/root/test
0a855d05e2f4:~/test # mount -v /root/test /mnt/test
mount: you didn't specify a filesystem type for /root/test
       I will try all types mentioned in /etc/filesystems or /proc/filesystems
Trying vfat
Trying hfs
Trying minix
Trying reiserfs
Trying ext3
mount: permission denied
0a855d05e2f4:~/test # 

BTW:

0a855d05e2f4:/etc # cat fstab
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc   /proc    proc   defaults        0 0
0a855d05e2f4:/etc # ls -al /bin/mount
-rwsr-xr-x 1 root root 94808 Jun  9  2015 /bin/mount