From 4ea09b90f19ebb9de7bf142d1c4fd17b4c8380ed Mon Sep 17 00:00:00 2001 From: Jessica Frazelle Date: Mon, 27 Jul 2015 23:46:07 -0700 Subject: [PATCH] update consul images Signed-off-by: Jessica Frazelle --- consul-alerts/Dockerfile | 34 ++++++++++++++++++++-------------- consul/Dockerfile | 26 +++++++++++++++----------- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/consul-alerts/Dockerfile b/consul-alerts/Dockerfile index 579ba93..083f093 100644 --- a/consul-alerts/Dockerfile +++ b/consul-alerts/Dockerfile @@ -1,20 +1,26 @@ -FROM debian:jessie +FROM alpine:latest MAINTAINER Jessica Frazelle +RUN apk update && apk add \ + ca-certificates \ + curl \ + unzip \ + && curl -sSL https://circle-artifacts.com/gh/andyshinn/alpine-pkg-glibc/6/artifacts/0/home/ubuntu/alpine-pkg-glibc/packages/x86_64/glibc-2.21-r2.apk -o /tmp/glibc-2.21-r2.apk \ + && apk add --allow-untrusted /tmp/glibc-2.21-r2.apk \ + && curl -sSL https://circle-artifacts.com/gh/andyshinn/alpine-pkg-glibc/6/artifacts/0/home/ubuntu/alpine-pkg-glibc/packages/x86_64/glibc-bin-2.21-r2.apk -o /tmp/glibc-bin-2.21-r2.apk \ + && apk add --allow-untrusted /tmp/glibc-bin-2.21-r2.apk \ + && rm -rf /tmp/glibc* \ + && rm -rf /var/cache/apk/* + ENV CONSUL_VERSION 0.5.2 -ADD https://jesss.s3.amazonaws.com/binaries/consul-alerts /usr/local/bin/consul-alerts -ADD https://jesss.s3.amazonaws.com/binaries/consul/${CONSUL_VERSION}/consul /usr/local/bin/consul -ADD https://jesss.s3.amazonaws.com/binaries/curl-unix-socket /usr/local/bin/curl-unix-socket - -RUN apt-get update && apt-get install -y \ - ca-certificates \ - curl \ - --no-install-recommends \ - && rm -rf /var/lib/apt/lists/* \ +RUN curl -sSL https://jesss.s3.amazonaws.com/binaries/consul/${CONSUL_VERSION}/consul -o /bin/consul \ + && curl -sSL https://jesss.s3.amazonaws.com/binaries/curl-unix-socket -o /bin/curl-unix-socket \ + && curl -sSL https://jesss.s3.amazonaws.com/binaries/consul-alerts -o /bin/consul-alerts \ && mkdir -p /etc/consul.d/ \ - && chmod +x /usr/local/bin/consul \ - && chmod +x /usr/local/bin/curl-unix-socket \ - && chmod +x /usr/local/bin/consul-alerts + && chmod +x /bin/consul \ + && chmod +x /bin/curl-unix-socket \ + && chmod +x /bin/consul-alerts -ENTRYPOINT [ "/usr/local/bin/consul-alerts", "start" ] +ENTRYPOINT [ "/bin/consul-alerts" ] +CMD [ "start" ] diff --git a/consul/Dockerfile b/consul/Dockerfile index a03a2a2..b69595a 100644 --- a/consul/Dockerfile +++ b/consul/Dockerfile @@ -1,24 +1,28 @@ -FROM debian:jessie +FROM alpine:latest MAINTAINER Jessica Frazelle -RUN apt-get update && apt-get install -y \ +RUN apk update && apk add \ ca-certificates \ curl \ unzip \ - --no-install-recommends \ - && rm -rf /var/lib/apt/lists/* + && curl -sSL https://circle-artifacts.com/gh/andyshinn/alpine-pkg-glibc/6/artifacts/0/home/ubuntu/alpine-pkg-glibc/packages/x86_64/glibc-2.21-r2.apk -o /tmp/glibc-2.21-r2.apk \ + && apk add --allow-untrusted /tmp/glibc-2.21-r2.apk \ + && curl -sSL https://circle-artifacts.com/gh/andyshinn/alpine-pkg-glibc/6/artifacts/0/home/ubuntu/alpine-pkg-glibc/packages/x86_64/glibc-bin-2.21-r2.apk -o /tmp/glibc-bin-2.21-r2.apk \ + && apk add --allow-untrusted /tmp/glibc-bin-2.21-r2.apk \ + && rm -rf /tmp/glibc* \ + && rm -rf /var/cache/apk/* ENV CONSUL_VERSION 0.5.2 -ADD https://jesss.s3.amazonaws.com/binaries/consul/${CONSUL_VERSION}/consul /usr/local/bin/consul -ADD https://jesss.s3.amazonaws.com/binaries/curl-unix-socket /usr/local/bin/curl-unix-socket -# download the ui -RUN curl -sSL https://jesss.s3.amazonaws.com/binaries/consul/${CONSUL_VERSION}/ui.zip -o /tmp/ui.zip \ +RUN curl -sSL https://jesss.s3.amazonaws.com/binaries/consul/${CONSUL_VERSION}/consul -o /bin/consul \ + && curl -sSL https://jesss.s3.amazonaws.com/binaries/curl-unix-socket -o /bin/curl-unix-socket \ + && curl -sSL https://jesss.s3.amazonaws.com/binaries/consul/${CONSUL_VERSION}/ui.zip -o /tmp/ui.zip \ && unzip /tmp/ui.zip -d /usr/src/ \ && rm -rf /tmp/ui.zip \ && mv /usr/src/dist /usr/src/consul \ && mkdir -p /etc/consul.d/ \ - && chmod +x /usr/local/bin/consul \ - && chmod +x /usr/local/bin/curl-unix-socket + && chmod +x /bin/consul \ + && chmod +x /bin/curl-unix-socket \ + && /usr/glibc/usr/bin/ldconfig /lib /usr/glibc/usr/lib -ENTRYPOINT [ "/usr/local/bin/consul" ] +ENTRYPOINT [ "/bin/consul" ]