Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eaefc74
commit d145d76
Showing
1 changed file
with
15 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |