Skip to content

Conversation

@abdullah-abunada
Copy link

FROM nginx:stable

RUN apt-get update \
    && apt-get install -y  \
        bc \
        ca-certificates \
        curl \
        unzip \
    && rm -rf /var/lib/apt/lists/*

ENV CONSUL_TEMPLATE_VERSION 0.19.0
ENV CONSUL_TEMPLATE_SHA1 31dda6ebc7bd7712598c6ac0337ce8fd8c533229887bd58e825757af879c5f9f

RUN curl --retry 7 -Lso /tmp/consul-template.zip \
        "https://releases.hashicorp.com/consul-template/${CONSUL_TEMPLATE_VERSION}/consul-template_${CONSUL_TEMPLATE_VERSION}_linux_amd64.zip" \
    && echo "${CONSUL_TEMPLATE_SHA1}  /tmp/consul-template.zip" | sha256sum -c \
    && unzip /tmp/consul-template.zip -d /usr/local/bin \
    && rm /tmp/consul-template.zip

  ENV CONTAINERPILOT_VERSION 3.3.0
  ENV CONTAINERPILOT_SHA1 62621712ef6ba755e24805f616096de13e2fd087
  ENV CONTAINERPILOT file:///etc/containerpilot.json

  RUN curl --retry 7 -Lso /tmp/containerpilot.tar.gz \
           "https://github.com/joyent/containerpilot/releases/download/${CONTAINERPILOT_VERSION}/containerpilot-${CONTAINERPILOT_VERSION}.tar.gz" \
      && echo "${CONTAINERPILOT_SHA1}  /tmp/containerpilot.tar.gz" | sha1sum -c \
      && tar zxf /tmp/containerpilot.tar.gz -C /usr/local/bin \
      && rm /tmp/containerpilot.tar.gz

COPY config/ /etc
COPY scripts/ /usr/local/bin

RUN chmod +x /usr/local/bin/reload.sh
RUN chmod +x /usr/local/bin/sensor.sh

CMD [ "/usr/local/bin/containerpilot", \
    "nginx", \
        "-g", \
        "daemon off;"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants