diff --git a/scripts/build/docker/Dockerfile-i686 b/scripts/build/docker/Dockerfile-i686 index dc2069a6..b85ed694 100644 --- a/scripts/build/docker/Dockerfile-i686 +++ b/scripts/build/docker/Dockerfile-i686 @@ -1,15 +1,17 @@ -FROM resin/i386-debian:jessie +FROM erwinchang/ubuntu-12.04-32bit-build # Setup APT sources -RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list + +RUN sed s,ubuntu\.stu\.edu\.tw,archive.ubuntu.com, /etc/apt/sources.list > /tmp/sources.list \ + && mv /tmp/sources.list /etc/apt/sources.list + + # Install dependencies RUN apt-get update \ && apt-get install -y \ build-essential \ curl \ - dpkg \ - fakeroot \ fuse \ git \ jq \ @@ -18,7 +20,6 @@ RUN apt-get update \ libgtk2.0-0 \ libx11-xcb1 \ libnss3 \ - libsass0 \ libxss1 \ libxtst6 \ libyaml-dev \ @@ -26,12 +27,15 @@ RUN apt-get update \ python-pip \ python-dev \ python-software-properties \ - rsync \ unzip \ xvfb \ - xauth \ zip +# Install a C++11 compiler +RUN add-apt-repository ppa:ubuntu-toolchain-r/test \ + && apt-get update && apt-get install -y gcc-4.8 g++-4.8 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50 + # NodeJS RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - \ && apt-get install -y nodejs diff --git a/scripts/build/docker/Dockerfile-x86_64 b/scripts/build/docker/Dockerfile-x86_64 index f9b2713e..4e988010 100644 --- a/scripts/build/docker/Dockerfile-x86_64 +++ b/scripts/build/docker/Dockerfile-x86_64 @@ -1,15 +1,16 @@ -FROM resin/amd64-debian:jessie +FROM ubuntu:12.04 # Setup APT sources -RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list + + +RUN echo "deb http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse" >> /etc/apt/sources.list + # Install dependencies RUN apt-get update \ && apt-get install -y \ build-essential \ curl \ - dpkg \ - fakeroot \ fuse \ git \ jq \ @@ -18,7 +19,6 @@ RUN apt-get update \ libgtk2.0-0 \ libx11-xcb1 \ libnss3 \ - libsass0 \ libxss1 \ libxtst6 \ libyaml-dev \ @@ -26,12 +26,15 @@ RUN apt-get update \ python-pip \ python-dev \ python-software-properties \ - rsync \ unzip \ xvfb \ - xauth \ zip +# Install a C++11 compiler +RUN add-apt-repository ppa:ubuntu-toolchain-r/test \ + && apt-get update && apt-get install -y gcc-4.8 g++-4.8 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50 + # NodeJS RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - \ && apt-get install -y nodejs diff --git a/scripts/build/docker/Dockerfile.template b/scripts/build/docker/Dockerfile.template index 01af0d30..10074f2b 100644 --- a/scripts/build/docker/Dockerfile.template +++ b/scripts/build/docker/Dockerfile.template @@ -1,15 +1,19 @@ FROM <%= image %> # Setup APT sources -RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list +<% if (architecture == 'i686') { %> +RUN sed s,ubuntu\.stu\.edu\.tw,archive.ubuntu.com, /etc/apt/sources.list > /tmp/sources.list \ + && mv /tmp/sources.list /etc/apt/sources.list +<% } %> +<% if (architecture == 'x86_64') { %> +RUN echo "deb http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse" >> /etc/apt/sources.list +<% } %> # Install dependencies RUN apt-get update \ && apt-get install -y \ build-essential \ curl \ - dpkg \ - fakeroot \ fuse \ git \ jq \ @@ -18,7 +22,6 @@ RUN apt-get update \ libgtk2.0-0 \ libx11-xcb1 \ libnss3 \ - libsass0 \ libxss1 \ libxtst6 \ libyaml-dev \ @@ -26,12 +29,15 @@ RUN apt-get update \ python-pip \ python-dev \ python-software-properties \ - rsync \ unzip \ xvfb \ - xauth \ zip +# Install a C++11 compiler +RUN add-apt-repository ppa:ubuntu-toolchain-r/test \ + && apt-get update && apt-get install -y gcc-4.8 g++-4.8 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50 + # NodeJS RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - \ && apt-get install -y nodejs diff --git a/scripts/build/docker/compile-template.js b/scripts/build/docker/compile-template.js index 679fed59..988bc798 100644 --- a/scripts/build/docker/compile-template.js +++ b/scripts/build/docker/compile-template.js @@ -31,11 +31,11 @@ const template = fs.readFileSync(path.join(currentDirectory, 'Dockerfile.templat _.each([ { architecture: 'i686', - image: 'resin/i386-debian:jessie' + image: 'erwinchang/ubuntu-12.04-32bit-build' }, { architecture: 'x86_64', - image: 'resin/amd64-debian:jessie' + image: 'ubuntu:12.04' } ], (options) => { const result = _.template(template)(options);