aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Dockerfile.3213
-rw-r--r--scripts/Dockerfile.32.ubuntu5
-rw-r--r--scripts/Dockerfile.6413
-rw-r--r--scripts/Dockerfile.64.ubuntu5
-rwxr-xr-xscripts/build-docker-otp13
-rwxr-xr-xscripts/build-otp6
6 files changed, 54 insertions, 1 deletions
diff --git a/scripts/Dockerfile.32 b/scripts/Dockerfile.32
new file mode 100644
index 0000000000..9622c48a17
--- /dev/null
+++ b/scripts/Dockerfile.32
@@ -0,0 +1,13 @@
+FROM erlang/ubuntu-build:32bit
+
+COPY ./otp.tar.gz /buildroot/
+
+WORKDIR /buildroot/
+
+RUN tar xzf otp.tar.gz
+
+WORKDIR /buildroot/otp/
+
+ENV MAKEFLAGS -j10
+
+CMD ./scripts/build-otp
diff --git a/scripts/Dockerfile.32.ubuntu b/scripts/Dockerfile.32.ubuntu
new file mode 100644
index 0000000000..c334f74379
--- /dev/null
+++ b/scripts/Dockerfile.32.ubuntu
@@ -0,0 +1,5 @@
+FROM 32bit/ubuntu:16.04
+
+RUN apt-get update
+
+RUN apt-get --fix-missing -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev fop xsltproc default-jdk git autoconf libwxbase3.0-dev libwxgtk3.0-dev
diff --git a/scripts/Dockerfile.64 b/scripts/Dockerfile.64
new file mode 100644
index 0000000000..47702b04a5
--- /dev/null
+++ b/scripts/Dockerfile.64
@@ -0,0 +1,13 @@
+FROM erlang/ubuntu-build:64bit
+
+COPY ./otp.tar.gz /buildroot/
+
+WORKDIR /buildroot/
+
+RUN tar xzf otp.tar.gz
+
+WORKDIR /buildroot/otp/
+
+ENV MAKEFLAGS -j10
+
+CMD ./scripts/build-otp
diff --git a/scripts/Dockerfile.64.ubuntu b/scripts/Dockerfile.64.ubuntu
new file mode 100644
index 0000000000..514fea70b5
--- /dev/null
+++ b/scripts/Dockerfile.64.ubuntu
@@ -0,0 +1,5 @@
+FROM ubuntu:16.04
+
+RUN apt-get update
+
+RUN apt-get --fix-missing -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev fop xsltproc default-jdk git autoconf libwxbase3.0-dev libwxgtk3.0-dev
diff --git a/scripts/build-docker-otp b/scripts/build-docker-otp
new file mode 100755
index 0000000000..d796759691
--- /dev/null
+++ b/scripts/build-docker-otp
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+if [ $# -lt 1 ]; then
+ echo "Usage $0 32|64 [command]"
+ exit 1
+fi
+
+ARCH="$1"
+
+git archive --format=tar.gz --prefix=otp/ HEAD >otp.tar.gz
+
+docker build -t otp --file scripts/Dockerfile.$ARCH .
+docker run --volume="$PWD/logs:/buildroot/otp/logs" -i --rm otp $2
diff --git a/scripts/build-otp b/scripts/build-otp
index da09fb8045..92031c79c8 100755
--- a/scripts/build-otp
+++ b/scripts/build-otp
@@ -14,7 +14,7 @@ function progress {
}
function do_and_log {
- log="scripts/latest-log.$$"
+ log="logs/latest-log.$$"
echo "" >$log
echo -n "$1..."
(progress $log) &
@@ -32,6 +32,10 @@ function do_and_log {
fi
}
+if [ ! -d "logs" ]; then
+ mkdir logs
+fi
+
do_and_log "Autoconfing" autoconf
do_and_log "Configuring" configure
do_and_log "Building OTP" boot -a