moby: apt-get upgrade in plain Ubuntu precise image fails
I’m having trouble with running apt-get upgrade
on a custom-built precise base box. The box is built using debootstrap as in the contrib
scripts, like so:
debootstrap --verbose --variant=minbase --include='iproute,iputils-ping,lsb-release,curl,nano' --arch=amd64 precise
I already fixed another issue on the upgrade thanks to the workaround mentioned in #1024, but this here still shows up:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initscripts (2.88dsf-13.10ubuntu11.1) ...
mount: block device /dev/shm is write-protected, mounting read-only
mount: cannot mount block device /dev/shm read-only
dpkg: error processing initscripts (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
initscripts
E: Sub-process /usr/bin/dpkg returned an error code (1)
I dug up some lxc mailing list discussion on this from a year ago which you can find here, but the proposed workaround (rmdir /dev/shm && ln -s /run/shm /dev/shm
) does not cut it for me as the dir removal fails with failed to remove '/dev/shm': Device or resource busy
.
Any ideas how I could work around this?
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 30 (17 by maintainers)
Commits related to this issue
- new workaround for apt-get upgrade problem in current Ubuntu 12.04 base image the previous workaround doesn't work because of changes in the base image. I used a newer workaround described here: htt... — committed to mccahill/docker-swift by mccahill 10 years ago
- Fix ischroot detection (see https://github.com/dotcloud/docker/issues/1724) — committed to stucki/docker-lineageos by stucki 10 years ago
- assumes ubuntu is the latest thus requires no manual upgrade. otherwise we will face initscript issue https://github.com/dotcloud/docker/issues/1724 — committed to neofreko/docker-lampstack by neofreko 10 years ago
- Remove apt-get upgrade Currently upgrade breaks the container build. Upgrading is unrecommended inside a container, as there is no init system and some packages have to be held back. To see t... — committed to hamiltont/docker-lampstack by hamiltont 10 years ago
- Remove apt-get upgrade Convention is to avoid this if not needed, as there is no init system and some packages have to be held back. upgrade will sometimes break due to the state of ubuntu:latest... — committed to hamiltont/ZoneMinder by hamiltont 10 years ago
- Update Dockerfile https://github.com/docker/docker/issues/1724#issuecomment-26294856 — committed to pshouse/docker-ubuntu-vnc-desktop by pshouse 10 years ago
- Build 32-bit precise base images properly (https://github.com/docker/docker/issues/1724) — committed to clementine-player/Buildbot by davidsansome 9 years ago
- don't run in a container https://github.com/docker/docker/issues/1724 — committed to madebymany/base-builds by deleted user 8 years ago
- Merge pull request #1724 from aboch/nmd Make sure sbJoin programming rollback happens on each error — committed to trebonian/docker by mavenugo 7 years ago
I also had the same issue. Fixed by relocating “-y” at the end as below -
FROM ubuntu MAINTAINER debu_bbsr@yahoo.com RUN apt-get update RUN apt-get install apache2 -y RUN apt-get install apache2-utils -y RUN apt-get clean EXPOSE 80 CMD [“apache2ctl”, “-D”, “FOREGROUND”]