-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
53 lines (36 loc) · 1.65 KB
/
Dockerfile
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
48
49
50
51
52
53
FROM nginx:1.20.2
# fork from https://github.com/spujadas/elk-docker.git
MAINTAINER William Chong <[email protected]>
ENV REFRESHED_AT 2021-12-14
###############################################################################
# INSTALLATION
###############################################################################
RUN rm /etc/apt/sources.list.d/nginx-amplify.list
### install Filebeat
ENV FILEBEAT_VERSION 7.14.2
RUN apt-get update -qq \
&& apt-get install -qqy curl \
&& apt-get clean
# Keep the nginx logs inside the container
RUN unlink /var/log/nginx/access.log \
&& unlink /var/log/nginx/error.log \
&& touch /var/log/nginx/access.log \
&& touch /var/log/nginx/error.log \
&& chown nginx /var/log/nginx/*log \
&& chmod 644 /var/log/nginx/*log
# Copy nginx stub_status config
COPY ./conf.d/stub_status.conf /etc/nginx/conf.d
RUN curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-${FILEBEAT_VERSION}-amd64.deb \
&& dpkg -i filebeat-${FILEBEAT_VERSION}-amd64.deb \
&& rm filebeat-${FILEBEAT_VERSION}-amd64.deb
###############################################################################
# DATA
###############################################################################
### add dummy HTML file
COPY html /usr/share/nginx/html
###############################################################################
# START
###############################################################################
ADD ./start.sh /usr/local/bin/start.sh
RUN chmod +x /usr/local/bin/start.sh
ENTRYPOINT ["/usr/local/bin/start.sh"]