Skip to content

Commit

Permalink
get all the right files; make all the right directories
Browse files Browse the repository at this point in the history
  • Loading branch information
misterbisson committed Jul 21, 2016
1 parent f199630 commit b1f7142
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
13 changes: 11 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ RUN apk update && apk add \
netcat-openbsd \
&& rm -rf /var/cache/apk/*

# Add Containerpilot and its configuration
# Add ContainerPilot and its configuration
# Releases at https://github.com/joyent/containerpilot/releases
ENV CONTAINERPILOT_VER 2.3.0
COPY etc/containerpilot.json /etc/containerpilot.json
ENV CONTAINERPILOT file:///etc/containerpilot.json

RUN export CONTAINERPILOT_CHECKSUM=ec9dbedaca9f4a7a50762f50768cbc42879c7208 \
Expand All @@ -35,6 +34,10 @@ RUN export CONTAINERPILOT_CHECKSUM=ec9dbedaca9f4a7a50762f50768cbc42879c7208 \
&& tar zxf /tmp/containerpilot.tar.gz -C /usr/local/bin \
&& rm /tmp/containerpilot.tar.gz

# The our helper/glue scripts and configuration for this specific app
COPY bin /usr/local/bin
COPY etc /etc

# Install Consul
# Releases at https://releases.hashicorp.com/consul
RUN export CONSUL_VERSION=0.6.4 \
Expand All @@ -45,6 +48,12 @@ RUN export CONSUL_VERSION=0.6.4 \
&& rm /tmp/consul.zip \
&& mkdir /config

# Create empty directories for Consul config and data
RUN mkdir -p /etc/consul \
&& chown -R memcache /etc/consul \
&& mkdir -p /var/lib/consul \
&& chown -R memcache /var/lib/consul

# Reset entrypoint from base image
ENTRYPOINT []

Expand Down
4 changes: 2 additions & 2 deletions etc/containerpilot.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"coprocesses": [{{ if .CONSUL_AGENT }}
{
"command": ["/usr/local/bin/consul", "agent",
"-data-dir=/data",
"-config-dir=/config",
"-data-dir=/var/lib/consul",
"-config-dir=/etc/consul",
"-rejoin",
"-retry-join", "{{ .CONSUL }}",
"-retry-max", "10",
Expand Down

0 comments on commit b1f7142

Please sign in to comment.