This repository was archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathDockerfile.erb
More file actions
47 lines (36 loc) · 1.56 KB
/
Dockerfile.erb
File metadata and controls
47 lines (36 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM quay.io/aptible/ubuntu:<%= ENV.fetch 'OS_VERSION' %>
# Install NGiNX.
RUN apt-get update && \
apt-get install -y software-properties-common \
python-software-properties && \
add-apt-repository -y ppa:nginx/stable && apt-get update && \
apt-get -y install curl ucspi-tcp apache2-utils nginx ruby
ENV TAG <%= ENV.fetch 'TAG' %>
ENV KIBANA_VERSION <%= ENV.fetch 'KIBANA_VERSION' %>
ENV KIBANA_DOWNLOAD <%= ENV.fetch 'KIBANA_DOWNLOAD' %>
ENV KIBANA_SHA1SUM <%= ENV.fetch 'KIBANA_SHA1SUM' %>
RUN curl -fsSL "${KIBANA_DOWNLOAD}" -o ./installer.tar.gz && \
echo "${KIBANA_SHA1SUM} installer.tar.gz" | sha1sum -c - && \
mkdir /opt/kibana && \
tar xzf "installer.tar.gz" -C /opt/kibana --strip-components 1 && \
rm "installer.tar.gz"
# Overwrite default nginx config with our config.
RUN rm /etc/nginx/sites-enabled/*
ADD templates/sites-enabled /
RUN rm "/opt/kibana/config/kibana.yml"
ADD ${TAG}/templates/kibana.yml.erb /opt/kibana/config/
<% if ENV["TAG"] =="4.4" %>
ADD ${TAG}/patches /patches
RUN patch -p1 -d "/opt/kibana" < /patches/0001-Set-authorization-header-when-connecting-to-ES.patch
<% end %>
# Add script that starts NGiNX in front of Kibana and tails the NGiNX access/error logs.
ADD bin /usr/bin/
RUN chmod 700 /usr/bin/run-kibana.sh
RUN chmod 700 /usr/bin/check-es-version.sh
ADD files/.aptible.yml /.aptible/
# Add tests. Those won't run as part of the build because customers don't need to run
# them when deploying, but they'll be run in test.sh
ADD test /tmp/test
ADD ${TAG}/test /tmp/test
EXPOSE 80
CMD ["/usr/bin/run-kibana.sh"]