Last active
January 9, 2016 19:25
-
-
Save fragmede/1361932b63e2bca16c65 to your computer and use it in GitHub Desktop.
32-bit Precise Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM scratch | |
# Download from https://partner-images.canonical.com/core/precise/current/ubuntu-precise-core-cloudimg-i386-root.tar.gz | |
ADD ubuntu-precise-core-cloudimg-i386-root.tar.gz / | |
# a few minor docker-specific tweaks | |
# see https://github.com/docker/docker/blob/master/contrib/mkimage/debootstrap | |
RUN echo '#!/bin/sh' > /usr/sbin/policy-rc.d \ | |
&& echo 'exit 101' >> /usr/sbin/policy-rc.d \ | |
&& chmod +x /usr/sbin/policy-rc.d \ | |
\ | |
&& dpkg-divert --local --rename --add /sbin/initctl \ | |
&& cp -a /usr/sbin/policy-rc.d /sbin/initctl \ | |
&& sed -i 's/^exit.*/exit 0/' /sbin/initctl \ | |
\ | |
&& echo 'force-unsafe-io' > /etc/dpkg/dpkg.cfg.d/docker-apt-speedup \ | |
\ | |
&& echo 'DPkg::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' > /etc/apt/apt.conf.d/docker-clean \ | |
&& echo 'APT::Update::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' >> /etc/apt/apt.conf.d/docker-clean \ | |
&& echo 'Dir::Cache::pkgcache ""; Dir::Cache::srcpkgcache "";' >> /etc/apt/apt.conf.d/docker-clean \ | |
\ | |
&& echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/docker-no-languages \ | |
\ | |
&& echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/docker-gzip-indexes | |
# enable the universe | |
RUN sed -i 's/^#\s*\(deb.*universe\)$/\1/g' /etc/apt/sources.list | |
# overwrite this with 'CMD []' in a dependent Dockerfile | |
CMD ["/bin/bash"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment