From 8180ef18ff7515a8f499cc702e92d140d58b6ab5 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sun, 5 Feb 2017 08:32:48 -0800 Subject: [PATCH] xena/alpine: add glue, vardene --- base/alpine/box.rb | 23 +++++++++++++++++++++-- base/alpine/repositories | 6 +++--- base/alpine/runit/httpagent/run | 8 ++++++++ 3 files changed, 32 insertions(+), 5 deletions(-) create mode 100755 base/alpine/runit/httpagent/run diff --git a/base/alpine/box.rb b/base/alpine/box.rb index 3ab3c4b..dbf690c 100644 --- a/base/alpine/box.rb +++ b/base/alpine/box.rb @@ -4,9 +4,12 @@ copy "repositories", "/etc/apk/repositories" copy "runit/", "/etc/system" run "apk upgrade --no-cache" -run "apk add --no-cache --virtual xe-alpine-base tini ca-certificates runit" +run "apk add --no-cache --virtual xe-alpine-base tini ca-certificates runit libc6-compat" -env "BACKPLANE_AGENT_VERSION" => "1.2.2" +# if libtinfo.so.5 is used, install ncurses5-libs via apk +run "ln -s /usr/lib/libncurses.so.5 /usr/lib/libtinfo.so.5" + +env "BACKPLANE_AGENT_VERSION" => "1.2.3" run %q[ apk add -U --no-cache wget ca-certificates \ && wget https://bin.equinox.io/c/jWahGASjoRq/backplane-stable-linux-amd64.tgz \ && tar xf backplane-stable-linux-amd64.tgz \ @@ -14,6 +17,22 @@ run %q[ apk add -U --no-cache wget ca-certificates \ && rm backplane-stable-linux-amd64.tgz \ && apk del wget ] +run %q[ apk add -U --no-cache curl \ + && cd /usr/bin && curl https://xena.greedo.xeserv.us/files/httpagent.gz -o httpagent.gz \ + && gunzip httpagent.gz \ + && apk del curl ] + +# Add glue and vardene +run %q[ apk add -U --no-cache wget \ + && cd /usr/bin && wget https://xena.greedo.xeserv.us/files/glue \ + && chmod a+x /usr/bin/glue \ + && wget https://xena.greedo.xeserv.us/files/vardene \ + && chmod a+x /usr/bin/vardene \ + && cd /usr/local/share/ca-certificates \ + && wget https://xena.greedo.xeserv.us/files/ca.pem -O xeserv_ca.pem \ + && update-ca-certificates \ + && apk del wget ] + copy "./entrypoint.sh", "/usr/sbin/entrypoint.sh" entrypoint "/usr/sbin/entrypoint.sh" diff --git a/base/alpine/repositories b/base/alpine/repositories index 369fe07..a7e539e 100644 --- a/base/alpine/repositories +++ b/base/alpine/repositories @@ -1,3 +1,3 @@ -http://dl-4.alpinelinux.org/alpine/edge/main -http://dl-4.alpinelinux.org/alpine/edge/testing -http://dl-4.alpinelinux.org/alpine/edge/community +http://dl-cdn.alpinelinux.org/alpine/edge/main +http://dl-cdn.alpinelinux.org/alpine/edge/testing +http://dl-cdn.alpinelinux.org/alpine/edge/community diff --git a/base/alpine/runit/httpagent/run b/base/alpine/runit/httpagent/run new file mode 100755 index 0000000..c866312 --- /dev/null +++ b/base/alpine/runit/httpagent/run @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ -n "$ROUTE_TOKEN" ] +then + /usr/bin/httpagent -token "$ROUTE_TOKEN" -backend "$ROUTE_BACKEND" -server "$ROUTE_FRONTEND" +else + sleep 999d +fi