Skip to content

Commit

Permalink
Updated Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
hartfordfive committed May 10, 2017
1 parent eaefc74 commit d145d76
Showing 1 changed file with 15 additions and 21 deletions.
36 changes: 15 additions & 21 deletions Dockerfile
@@ -1,46 +1,40 @@
FROM node:6-alpine
FROM alpine

# Misc
LABEL Description="Protologbeat Docker image based on Alpine" Vendor="Alain Lefebvre"
MAINTAINER Alain Lefebvre <hartfordfive@gmail.com>

#RUN apk update && \
# apk upgrade && \
# apk add curl

ARG version
ENV VERSION=$version
ARG VERSION
ENV VERSION=$VERSION

RUN set -ex ;\
# Ensure kibana user exists
addgroup -S protologbeat && adduser -S -G protologbeat protologbeat ;\
# Install dependencies
apk --no-cache add bash fontconfig gettext su-exec tini curl ;\
# Fix permissions
mkdir -p /opt/protologbeat/conf && mkdir -p /opt/protologbeat/ssl

RUN curl -Lso - https://github.com/hartfordfive/protologbeat/releases/download/${VERSION}/protologbeat-${VERSION}-linux-x86_64.tar.gz | \
tar zxf - -C /tmp && \
cp /tmp/protologbeat-${VERSION}-linux-x86_64 /opt/protologbeat/protologbeat
# cp /tmp/protologbeat-0.1.0-linux-x86_64 /usr/share/protologbeat
apk --no-cache add gettext libc6-compat curl ;\
# Hotfix for libc compat
ln -s /lib /lib64

RUN cd /tmp ;\
mkdir -p /opt/protologbeat/conf ;\
mkdir -p /opt/protologbeat/ssl ;\
curl -L https://github.com/hartfordfive/protologbeat/releases/download/${VERSION}/protologbeat-${VERSION}-linux-x86_64.tar.gz --output protologbeat-${VERSION}-linux-x86_64.tar.gz ;\
tar -xvzf protologbeat-${VERSION}-linux-x86_64.tar.gz ;\
mv /tmp/protologbeat-${VERSION}-linux-x86_64 /opt/protologbeat/protologbeat ;\
rm -rf protologbeat-${VERSION}-linux-x86_64 && rm protologbeat-${VERSION}-linux-x86_64.tar.gz

ENV PATH=/opt/protologbeat:$PATH

COPY protologbeat-docker.yml /opt/protologbeat/conf/protologbeat.yml
COPY protologbeat.template-es2x.json /opt/protologbeat
COPY protologbeat.template.json /opt/protologbeat

# Fix permissions
RUN chown -R protologbeat:protologbeat /opt/protologbeat ;\
chmod 750 /opt/protologbeat ;\
chmod 700 /opt/protologbeat/ssl

WORKDIR /opt/protologbeat


USER protologbeat





CMD ["protologbeat", "-e", "-c", "/opt/protologbeat/conf/protologbeat.yml"]

0 comments on commit d145d76

Please sign in to comment.