From dc6b6f616d116953853f4a6c4308313285d1199d Mon Sep 17 00:00:00 2001 From: David Bresson Date: Mon, 6 Mar 2017 19:27:23 -0800 Subject: [PATCH] Fix nomad on alpine --- docker/Dockerfile | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 4b5d8f1..84aaa67 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,10 +1,19 @@ -FROM alpine +FROM alpine:3.5 ARG NOMAD_VERSION=0.5.2 -RUN apk add --no-cache wget ca-certificates unzip ruby &&\ - wget -q https://releases.hashicorp.com/nomad/${NOMAD_VERSION}/nomad_${NOMAD_VERSION}_linux_amd64.zip &&\ - unzip -d /usr/local/bin nomad_${NOMAD_VERSION}_linux_amd64.zip &&\ - rm nomad_${NOMAD_VERSION}_linux_amd64.zip &&\ - chmod +x /usr/local/bin/nomad &&\ +RUN apk add --no-cache ruby go make git musl-dev bash &&\ + mkdir -p /tmp/src/github.com/hashicorp/ &&\ + cd /tmp/src/github.com/hashicorp/ &&\ + git clone https://github.com/hashicorp/nomad.git &&\ + cd nomad &&\ + git checkout v${NOMAD_VERSION} &&\ + export GOPATH=/tmp &&\ + export PATH=/tmp/bin:$PATH &&\ + make bootstrap &&\ + make dev &&\ + make install &&\ + cd / &&\ + rm -rf /tmp/* &&\ + apk del go make git musl-dev bash &&\ gem install --no-document bedouin USER nobody ENTRYPOINT ["bedouin"]