diff --git a/binaries/ag b/binaries/linux/x86_64/ag similarity index 100% rename from binaries/ag rename to binaries/linux/x86_64/ag diff --git a/binaries/linux/x86_64/socat b/binaries/linux/x86_64/socat new file mode 100755 index 0000000..b672382 Binary files /dev/null and b/binaries/linux/x86_64/socat differ diff --git a/socat/Dockerfile b/socat/Dockerfile new file mode 100644 index 0000000..bbbf88f --- /dev/null +++ b/socat/Dockerfile @@ -0,0 +1,18 @@ +FROM debian:jessie +MAINTAINER Andrew Dunham + +# Install build tools +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get upgrade -yy && \ + DEBIAN_FRONTEND=noninteractive apt-get install -yy \ + automake \ + build-essential \ + curl \ + git \ + pkg-config + +RUN mkdir /build +ADD . /build + +# This builds the program and copies it to /output +CMD /build/build.sh diff --git a/socat/build.sh b/socat/build.sh new file mode 100755 index 0000000..059d449 --- /dev/null +++ b/socat/build.sh @@ -0,0 +1,135 @@ +#!/bin/bash + +set -e +set -o pipefail +set -x + + +MUSL_VERSION=1.1.6 +SOCAT_VERSION=1.7.3.0 +NCURSES_VERSION=5.9 +READLINE_VERSION=6.3 +OPENSSL_VERSION=1.0.2 + + +function build_musl() { + cd /build + + # Download + curl -LO http://www.musl-libc.org/releases/musl-${MUSL_VERSION}.tar.gz + tar zxvf musl-${MUSL_VERSION}.tar.gz + cd musl-${MUSL_VERSION} + + # Build + ./configure + make -j4 + make install +} + +function build_ncurses() { + cd /build + + # Download + curl -LO http://invisible-island.net/datafiles/release/ncurses.tar.gz + tar zxvf ncurses.tar.gz + cd ncurses-${NCURSES_VERSION} + + # Build + CC='/usr/local/musl/bin/musl-gcc -static' CFLAGS='-fPIC' ./configure \ + --disable-shared \ + --enable-static +} + +function build_readline() { + cd /build + + # Download + curl -LO ftp://ftp.cwru.edu/pub/bash/readline-${READLINE_VERSION}.tar.gz + tar xzvf readline-${READLINE_VERSION}.tar.gz + cd readline-${READLINE_VERSION} + + # Build + CC='/usr/local/musl/bin/musl-gcc -static' CFLAGS='-fPIC' ./configure \ + --disable-shared \ + --enable-static + make -j4 + + # Note that socat looks for readline in , so we need + # that directory to exist. + ln -s /build/readline-${READLINE_VERSION} /build/readline +} + +function build_openssl() { + cd /build + + # Download + curl -LO https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz + tar zxvf openssl-${OPENSSL_VERSION}.tar.gz + cd openssl-${OPENSSL_VERSION} + + # Patch to make OpenSSL support MUSL + patch -p1 <