Skip to content

Instantly share code, notes, and snippets.

@jots
Created August 14, 2013 18:30
Show Gist options
  • Save jots/6234022 to your computer and use it in GitHub Desktop.
Save jots/6234022 to your computer and use it in GitHub Desktop.
try to create ubuntu 13.04 image from Dockerfile errors upgrading upstart
# Ubuntu Raring
# Version 0.1
FROM ubuntu:12.10
# https://github.com/dotcloud/docker/issues/1024
run dpkg-divert --local --rename --add /sbin/initctl
run cp /bin/true /sbin/initctl
# these resources helped...
# http://askubuntu.com/questions/250733/can-i-do-a-silent-or-unattended-release-upgrade
# https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/994152
# http://www.prestonlee.com/2013/04/26/ubuntu-12-10-to-13-04-server-upgrade-error/
RUN apt-get -y update
# need to remove it b4 upgrade, otherwise error
RUN apt-get -y remove rsyslog
RUN apt-get -y upgrade
# put rsyslog back
RUN apt-get -y install rsyslog
RUN apt-get -y install update-manager-core
RUN echo "deb http://gb.archive.ubuntu.com/ubuntu/ quantal-updates main restricted" >> /etc/apt/sources.list
RUN echo "deb-src http://gb.archive.ubuntu.com/ubuntu/ quantal-updates main restricted" >> /etc/apt/sources.list
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get -y install python-apt
# this next final step fails, the error is:
# Errors were encountered while processing:
# /var/cache/apt/archives/upstart_1.8-0ubuntu1_amd64.deb
# if I try to:
# apt-get install --reinstall upstart
# inside the container made so far, I get:
# dpkg: error processing /var/cache/apt/archives/upstart_1.8-0ubuntu1_amd64.deb (--unpack):
# unable to make backup link of `./sbin/init' before installing new version: Invalid cross-device link
# I can't seem to mess with /sbin/init as it's a readonly FS. even chattr -i doesn't work.
RUN do-release-upgrade -d -f DistUpgradeViewNonInteractive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment