Skip to content

Instantly share code, notes, and snippets.

@wizardjedi
Last active August 29, 2015 14:13
Show Gist options
  • Save wizardjedi/0490a423fec59cd1aac4 to your computer and use it in GitHub Desktop.
Save wizardjedi/0490a423fec59cd1aac4 to your computer and use it in GitHub Desktop.
Create docker image from OS image
sudo apt-get install debootstrap dchroot
mkdir tmp-os
sudo debootstrap --arch i386 --variant=minbase stable os-tmp http://ftp.debian.org/debian/
sudo chroot os-tmp /bin/bash
apt-get update && apt-get install curl vim mc wget
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
###
cd /tmp
sudo debootstrap --arch=i386 feisty feisty http://old-releases.ubuntu.com/ubuntu
sudo tar -C feisty -c . | docker import - feisty
sudo docker tag mydeb:latest wizardjedi/mydeb:latest
sudo docker push wizardjedi/mydeb:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment