From 3fa98665beda230eca2a26c2359002a2b69204e0 Mon Sep 17 00:00:00 2001 From: Dan Lorenc Date: Fri, 13 May 2016 09:34:03 -0700 Subject: [PATCH] Build socat as part of the iso build. --- iso/Dockerfile | 1 + iso/Dockerfile.socat | 8 ++++++++ iso/build.sh | 6 ++++++ 3 files changed, 15 insertions(+) create mode 100644 iso/Dockerfile.socat diff --git a/iso/Dockerfile b/iso/Dockerfile index 095134941a..6531a06c3b 100644 --- a/iso/Dockerfile +++ b/iso/Dockerfile @@ -8,6 +8,7 @@ ENV DOCKER_SHA 8824f8a67fbe55d1e52dcbebc74219ba8090006e # Add other dependencies here to $ROOTFS/ ADD nsenter $ROOTFS/usr/bin/ +ADD socat $ROOTFS/usr/bin # Get a specific version of Docker. This will overwrite the binary installed # in the base image. diff --git a/iso/Dockerfile.socat b/iso/Dockerfile.socat new file mode 100644 index 0000000000..6f203839cf --- /dev/null +++ b/iso/Dockerfile.socat @@ -0,0 +1,8 @@ +FROM golang:1.6 + +RUN apt-get update && apt-get install libssl-dev -q -y + +ENV SOCAT socat-2.0.0-b8 +RUN wget http://www.dest-unreach.org/socat/download/$SOCAT.tar.gz +RUN tar -zvxf $SOCAT.tar.gz +RUN cd $SOCAT && ./configure --disable-readline && make && mv ./socat /go/ diff --git a/iso/build.sh b/iso/build.sh index 4c4a7d6c42..75ac50bf16 100755 --- a/iso/build.sh +++ b/iso/build.sh @@ -7,9 +7,15 @@ echo "Building in $tmpdir." cp -r . $tmpdir/ pushd $tmpdir + # Get nsenter. docker run --rm jpetazzo/nsenter cat /nsenter > $tmpdir/nsenter && chmod +x $tmpdir/nsenter +# Get socat +docker build -t socat -f Dockerfile.socat . +docker run socat cat socat > $tmpdir/socat +chmod +x $tmpdir/socat + # Do the build. docker build -t iso .