forked from allinurl/goaccess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
64 lines (41 loc) · 1.17 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
54
55
56
57
58
59
60
61
62
63
64
FROM alpine:edge
LABEL maintainer "Julian Xhokaxhiu <[email protected]>"
# Environment variables
#######################
ENV DATA_DIR /srv/data
# Configurable environment variables
####################################
# Copy required files and fix permissions
#########################################
COPY Dockerfile_src/* /opt/
# Create missing directories
############################
RUN mkdir -p $DATA_DIR \
&& mkdir -p /opt
# Set the work directory
########################
WORKDIR /opt
# Fix permissions
#################
RUN chmod 0644 * \
&& chmod 0755 *.sh
# Install required packages
##############################
RUN apk update \
&& apk add -u supervisor goaccess
# Cleanup
#########
RUN rm -rf /var/cache/apk/*
# Replace default configurations
################################
RUN rm /etc/supervisord.conf \
&& mv /opt/supervisord.conf /etc
# Allow redirection of stdout to docker logs
############################################
RUN ln -sf /proc/1/fd/1 /var/log/docker.log
# Expose required ports
#######################
EXPOSE 7890
# Set the entry point to init.sh
###########################################
ENTRYPOINT ["/opt/init.sh"]